Struct bonsaidb_core::document::Header
source · [−]pub struct Header {
pub id: DocumentId,
pub revision: Revision,
}Expand description
The header of a Document.
Fields
id: DocumentIdThe id of the Document. Unique across the collection the document is contained within.
revision: RevisionThe revision of the stored document.
Trait Implementations
sourceimpl AsMut<Header> for OwnedDocument
impl AsMut<Header> for OwnedDocument
sourceimpl<'a> AsMut<Header> for BorrowedDocument<'a>
impl<'a> AsMut<Header> for BorrowedDocument<'a>
sourceimpl<'a> AsRef<Header> for BorrowedDocument<'a>
impl<'a> AsRef<Header> for BorrowedDocument<'a>
sourceimpl<'de> Deserialize<'de> for Header
impl<'de> Deserialize<'de> for Header
sourcefn 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
sourceimpl Emit for Header
impl Emit for Header
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> 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 Eq for Header
impl StructuralEq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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