Enum bonsaidb::core::key::KeyDescription
source · 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§
source§impl KeyDescription
impl KeyDescription
sourcepub fn for_encoding<KE, K>() -> KeyDescriptionwhere
KE: KeyEncoding<K>,
K: for<'k> Key<'k> + 'static,
pub fn for_encoding<KE, K>() -> KeyDescriptionwhere
KE: KeyEncoding<K>,
K: for<'k> Key<'k> + 'static,
Returns a description of the given KeyEncoding
implementor.
Panics
This function will panic if KE
emits an imbalanced sequence of visit
calls.
Trait Implementations§
source§impl Clone for KeyDescription
impl Clone for KeyDescription
source§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 moresource§impl Debug for KeyDescription
impl Debug for KeyDescription
source§impl<'de> Deserialize<'de> for KeyDescription
impl<'de> Deserialize<'de> for KeyDescription
source§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
source§impl PartialEq for KeyDescription
impl PartialEq for KeyDescription
source§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 ==
.source§impl Serialize for KeyDescription
impl Serialize for KeyDescription
source§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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.