pub struct CollectionHeader<PrimaryKey> {
pub id: PrimaryKey,
pub revision: Revision,
}Expand description
A header for a CollectionDocument.
Fields§
§id: PrimaryKeyThe unique id of the document.
revision: RevisionThe 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 duplicate 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 for CollectionHeader<PrimaryKey>
impl<PrimaryKey: PartialEq> PartialEq for CollectionHeader<PrimaryKey>
Source§fn eq(&self, other: &CollectionHeader<PrimaryKey>) -> bool
fn eq(&self, other: &CollectionHeader<PrimaryKey>) -> bool
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> StructuralPartialEq for CollectionHeader<PrimaryKey>
Auto Trait Implementations§
impl<PrimaryKey> Freeze for CollectionHeader<PrimaryKey>where
PrimaryKey: Freeze,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more