Struct bonsaidb_core::document::Header
source · pub struct Header {
pub id: DocumentId,
pub revision: Revision,
}
Expand description
The header of a Document
.
Fields§
§id: DocumentId
The id of the Document. Unique across the collection the document is contained within.
revision: Revision
The revision of the stored document.
Trait Implementations§
source§impl<'a> AsMut<Header> for BorrowedDocument<'a>
impl<'a> AsMut<Header> for BorrowedDocument<'a>
source§impl AsMut<Header> for OwnedDocument
impl AsMut<Header> for OwnedDocument
source§impl<'a> AsRef<Header> for BorrowedDocument<'a>
impl<'a> AsRef<Header> for BorrowedDocument<'a>
source§impl AsRef<Header> for OwnedDocument
impl AsRef<Header> for OwnedDocument
source§impl<'de> Deserialize<'de> for Header
impl<'de> Deserialize<'de> for Header
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 Emit for Header
impl Emit for Header
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 PartialEq<Header> for Header
impl PartialEq<Header> for Header
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 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§
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