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: KeyEncoding<K>, K: for<'k> Key<'k>>() -> Self
pub fn for_encoding<KE: KeyEncoding<K>, K: for<'k> Key<'k>>() -> Self
Returns a description of the given KeyEncoding
implementor.
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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<KeyDescription> for KeyDescription
impl PartialEq<KeyDescription> 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 ==
.