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> + 'static>() -> Self
pub fn for_encoding<KE: KeyEncoding<K>, K: for<'k> Key<'k> + 'static>() -> Self
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<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 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
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§
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