Struct bonsaidb::core::document::OwnedDocument [−][src]
Expand description
Contains a serialized document in the database.
Fields
header: Header
The header of the document, which contains the id and Revision
.
contents: Bytes
The serialized bytes of the stored item.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<OwnedDocument, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<OwnedDocument, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn contents(&self) -> Result<<C as SerializedCollection>::Contents, Error> where
C: SerializedCollection,
pub fn contents(&self) -> Result<<C as SerializedCollection>::Contents, Error> where
C: SerializedCollection,
Retrieves contents
through deserialization into the type D
.
pub fn set_contents(
&mut self,
contents: <C as SerializedCollection>::Contents
) -> Result<(), Error> where
C: SerializedCollection,
pub fn set_contents(
&mut self,
contents: <C as SerializedCollection>::Contents
) -> Result<(), Error> where
C: SerializedCollection,
Stores contents
into this document.
Returns the unique key for this document.
Returns the header of this document.
Sets the header to the new header.
Returns the contents of this document, serialized.
fn set_collection_header(
&mut self,
header: CollectionHeader<<C as Collection>::PrimaryKey>
) -> Result<(), Error>
fn set_collection_header(
&mut self,
header: CollectionHeader<<C as Collection>::PrimaryKey>
) -> Result<(), Error>
Sets the header to the new collection header.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'a, C> TryFrom<&'a OwnedDocument> for CollectionDocument<C> where
C: SerializedCollection,
impl<'a, C> TryFrom<&'a OwnedDocument> for CollectionDocument<C> where
C: SerializedCollection,
pub fn try_from(
value: &'a OwnedDocument
) -> Result<CollectionDocument<C>, <CollectionDocument<C> as TryFrom<&'a OwnedDocument>>::Error>
pub fn try_from(
value: &'a OwnedDocument
) -> Result<CollectionDocument<C>, <CollectionDocument<C> as TryFrom<&'a OwnedDocument>>::Error>
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for OwnedDocument
impl Send for OwnedDocument
impl Sync for OwnedDocument
impl Unpin for OwnedDocument
impl UnwindSafe for OwnedDocument
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more