Struct bonsaidb::core::document::CollectionHeader
source · pub struct CollectionHeader<PrimaryKey> {
pub id: PrimaryKey,
pub revision: Revision,
}
Expand description
A header for a CollectionDocument
.
Fields§
§id: PrimaryKey
The unique id of the document.
revision: Revision
The revision of the document.
Trait Implementations§
source§impl<PrimaryKey> Clone for CollectionHeader<PrimaryKey>where
PrimaryKey: Clone,
impl<PrimaryKey> Clone for CollectionHeader<PrimaryKey>where
PrimaryKey: Clone,
source§fn clone(&self) -> CollectionHeader<PrimaryKey>
fn clone(&self) -> CollectionHeader<PrimaryKey>
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<PrimaryKey> Debug for CollectionHeader<PrimaryKey>where
PrimaryKey: Debug,
impl<PrimaryKey> Debug for CollectionHeader<PrimaryKey>where
PrimaryKey: Debug,
source§impl<'de, PrimaryKey> Deserialize<'de> for CollectionHeader<PrimaryKey>where
PrimaryKey: Deserialize<'de>,
impl<'de, PrimaryKey> Deserialize<'de> for CollectionHeader<PrimaryKey>where
PrimaryKey: Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<CollectionHeader<PrimaryKey>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<CollectionHeader<PrimaryKey>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<PrimaryKey> Emit for CollectionHeader<PrimaryKey>where
PrimaryKey: for<'k> Key<'k>,
impl<PrimaryKey> Emit for CollectionHeader<PrimaryKey>where
PrimaryKey: for<'k> Key<'k>,
source§fn emit_key_and_value<K, Value>(
&self,
key: K,
value: Value
) -> Result<Mappings<K, Value>, Error>
fn emit_key_and_value<K, Value>( &self, key: K, value: Value ) -> Result<Mappings<K, Value>, Error>
Creates a
Map
result with a key
and value
.source§fn emit_if(&self, condition: bool) -> Result<Mappings, Error>
fn emit_if(&self, condition: bool) -> Result<Mappings, Error>
Creates a
Map
result with an empty key and value if condition
is
true.source§impl<PrimaryKey> HasHeader for CollectionHeader<PrimaryKey>where
PrimaryKey: for<'k> Key<'k>,
impl<PrimaryKey> HasHeader for CollectionHeader<PrimaryKey>where
PrimaryKey: for<'k> Key<'k>,
source§impl<PrimaryKey> Hash for CollectionHeader<PrimaryKey>where
PrimaryKey: Hash,
impl<PrimaryKey> Hash for CollectionHeader<PrimaryKey>where
PrimaryKey: Hash,
source§impl<PrimaryKey> PartialEq for CollectionHeader<PrimaryKey>where
PrimaryKey: PartialEq,
impl<PrimaryKey> PartialEq for CollectionHeader<PrimaryKey>where
PrimaryKey: PartialEq,
source§fn eq(&self, other: &CollectionHeader<PrimaryKey>) -> bool
fn eq(&self, other: &CollectionHeader<PrimaryKey>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<PrimaryKey> Serialize for CollectionHeader<PrimaryKey>where
PrimaryKey: Serialize,
impl<PrimaryKey> Serialize for CollectionHeader<PrimaryKey>where
PrimaryKey: Serialize,
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
source§impl<'a, PrimaryKey> TryFrom<&'a CollectionHeader<PrimaryKey>> for Headerwhere
PrimaryKey: for<'k> Key<'k>,
impl<'a, PrimaryKey> TryFrom<&'a CollectionHeader<PrimaryKey>> for Headerwhere
PrimaryKey: for<'k> Key<'k>,
source§impl<'a, PrimaryKey> TryFrom<&'a Header> for CollectionHeader<PrimaryKey>where
PrimaryKey: for<'k> Key<'k>,
impl<'a, PrimaryKey> TryFrom<&'a Header> for CollectionHeader<PrimaryKey>where
PrimaryKey: for<'k> Key<'k>,
source§impl<PrimaryKey> TryFrom<CollectionHeader<PrimaryKey>> for Headerwhere
PrimaryKey: for<'k> Key<'k>,
impl<PrimaryKey> TryFrom<CollectionHeader<PrimaryKey>> for Headerwhere
PrimaryKey: for<'k> Key<'k>,
source§impl<PrimaryKey> TryFrom<Header> for CollectionHeader<PrimaryKey>where
PrimaryKey: for<'k> Key<'k>,
impl<PrimaryKey> TryFrom<Header> for CollectionHeader<PrimaryKey>where
PrimaryKey: for<'k> Key<'k>,
impl<PrimaryKey> Copy for CollectionHeader<PrimaryKey>where
PrimaryKey: Copy,
impl<PrimaryKey> Eq for CollectionHeader<PrimaryKey>where
PrimaryKey: Eq,
impl<PrimaryKey> StructuralEq for CollectionHeader<PrimaryKey>
impl<PrimaryKey> StructuralPartialEq for CollectionHeader<PrimaryKey>
Auto Trait Implementations§
impl<PrimaryKey> RefUnwindSafe for CollectionHeader<PrimaryKey>where
PrimaryKey: RefUnwindSafe,
impl<PrimaryKey> Send for CollectionHeader<PrimaryKey>where
PrimaryKey: Send,
impl<PrimaryKey> Sync for CollectionHeader<PrimaryKey>where
PrimaryKey: Sync,
impl<PrimaryKey> Unpin for CollectionHeader<PrimaryKey>where
PrimaryKey: Unpin,
impl<PrimaryKey> UnwindSafe for CollectionHeader<PrimaryKey>where
PrimaryKey: UnwindSafe,
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<T> CallHasher for T
impl<T> CallHasher for T
§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.