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: PrimaryKeyThe unique id of the document.
revision: RevisionThe revision of the document.
Trait Implementations
sourceimpl<PrimaryKey: Clone> Clone for CollectionHeader<PrimaryKey>
impl<PrimaryKey: Clone> Clone for CollectionHeader<PrimaryKey>
sourcefn clone(&self) -> CollectionHeader<PrimaryKey>
fn clone(&self) -> CollectionHeader<PrimaryKey>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<PrimaryKey: Debug> Debug for CollectionHeader<PrimaryKey>
impl<PrimaryKey: Debug> Debug for CollectionHeader<PrimaryKey>
sourceimpl<PrimaryKey> Emit for CollectionHeader<PrimaryKey> where
PrimaryKey: for<'k> Key<'k>,
impl<PrimaryKey> Emit for CollectionHeader<PrimaryKey> where
PrimaryKey: for<'k> Key<'k>,
sourcefn emit_key_and_value<K: for<'a> Key<'a>, Value>(
&self,
key: K,
value: Value
) -> Result<Mappings<K, Value>, Error>
fn emit_key_and_value<K: for<'a> Key<'a>, Value>(
&self,
key: K,
value: Value
) -> Result<Mappings<K, Value>, Error>
Creates a Map result with a key and value.
sourcefn emit(&self) -> Result<Mappings<(), ()>, Error>
fn emit(&self) -> Result<Mappings<(), ()>, Error>
Creates a Map result with an empty key and value.
sourceimpl<PrimaryKey> HasHeader for CollectionHeader<PrimaryKey> where
PrimaryKey: for<'k> Key<'k>,
impl<PrimaryKey> HasHeader for CollectionHeader<PrimaryKey> where
PrimaryKey: for<'k> Key<'k>,
sourceimpl<PrimaryKey: PartialEq> PartialEq<CollectionHeader<PrimaryKey>> for CollectionHeader<PrimaryKey>
impl<PrimaryKey: PartialEq> PartialEq<CollectionHeader<PrimaryKey>> for CollectionHeader<PrimaryKey>
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &CollectionHeader<PrimaryKey>) -> bool
fn ne(&self, other: &CollectionHeader<PrimaryKey>) -> bool
This method tests for !=.
sourceimpl<PrimaryKey> TryFrom<CollectionHeader<PrimaryKey>> for Header where
PrimaryKey: for<'k> Key<'k>,
impl<PrimaryKey> TryFrom<CollectionHeader<PrimaryKey>> for Header where
PrimaryKey: for<'k> Key<'k>,
sourceimpl<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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more