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> Clone for CollectionHeader<PrimaryKey>
impl<PrimaryKey: Clone> Clone for CollectionHeader<PrimaryKey>
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> Debug for CollectionHeader<PrimaryKey>
impl<PrimaryKey: Debug> Debug for CollectionHeader<PrimaryKey>
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<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<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(&self) -> Result<Mappings<(), ()>, Error>
fn emit(&self) -> Result<Mappings<(), ()>, Error>
Creates a
Map
result with an empty 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> Hash for CollectionHeader<PrimaryKey>
impl<PrimaryKey: Hash> Hash for CollectionHeader<PrimaryKey>
source§impl<PrimaryKey: PartialEq> PartialEq<CollectionHeader<PrimaryKey>> for CollectionHeader<PrimaryKey>
impl<PrimaryKey: PartialEq> PartialEq<CollectionHeader<PrimaryKey>> for CollectionHeader<PrimaryKey>
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§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> Copy for CollectionHeader<PrimaryKey>
impl<PrimaryKey: Eq> Eq for CollectionHeader<PrimaryKey>
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§
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