Enum bonsaidb::core::key::KeyDescription
pub enum KeyDescription {
Basic(KeyKind),
Composite(CompositeKeyDescription),
Other(Cow<'static, str>),
}
Expand description
A description of an encoded Key
.
Variants§
Basic(KeyKind)
A basic key type.
Composite(CompositeKeyDescription)
A composite key made up of more than one field.
Other(Cow<'static, str>)
Another type with a custom encoding format.
Implementations§
§impl KeyDescription
impl KeyDescription
pub fn for_encoding<KE, K>() -> KeyDescriptionwhere
KE: KeyEncoding<K>,
K: for<'k> Key<'k>,
pub fn for_encoding<KE, K>() -> KeyDescriptionwhere KE: KeyEncoding<K>, K: for<'k> Key<'k>,
Returns a description of the given KeyEncoding
implementor.
Panics
This function will panic if KE
emits an imbalanced sequence of visit
calls.
pub fn for_key<K>() -> KeyDescriptionwhere
K: for<'k> Key<'k>,
pub fn for_key<K>() -> KeyDescriptionwhere K: for<'k> Key<'k>,
Trait Implementations§
§impl Clone for KeyDescription
impl Clone for KeyDescription
§fn clone(&self) -> KeyDescription
fn clone(&self) -> KeyDescription
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for KeyDescription
impl Debug for KeyDescription
§impl<'de> Deserialize<'de> for KeyDescription
impl<'de> Deserialize<'de> for KeyDescription
§fn deserialize<__D>(
__deserializer: __D
) -> Result<KeyDescription, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<KeyDescription, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq<KeyDescription> for KeyDescription
impl PartialEq<KeyDescription> for KeyDescription
§fn eq(&self, other: &KeyDescription) -> bool
fn eq(&self, other: &KeyDescription) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Serialize for KeyDescription
impl Serialize for KeyDescription
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for KeyDescription
impl StructuralEq for KeyDescription
impl StructuralPartialEq for KeyDescription
Auto Trait Implementations§
impl RefUnwindSafe for KeyDescription
impl Send for KeyDescription
impl Sync for KeyDescription
impl Unpin for KeyDescription
impl UnwindSafe for KeyDescription
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.