pub struct SetDoc {
pub data: Blob,
pub description: Option<String>,
pub version: Option<Version>,
}
Expand description
Parameters for setting a document.
This struct, SetDoc
, is used to specify the parameters for setting or updating a document in a collection’s store.
It includes the following fields:
data
: ABlob
containing the new data for the document.description
: An optionalString
providing additional description for the document. This field is optional.version
: An optionalu64
version representing the last version of the document to ensure update consistency. This field is optional - i.e. first time a document is saved, it can be left empty but following updates require the current version to be passed.
SetDoc
is used to provide parameters for setting or updating a document in the collection’s store.
Fields§
§data: Blob
§description: Option<String>
§version: Option<Version>
Trait Implementations§
Source§impl CandidType for SetDoc
impl CandidType for SetDoc
Source§impl<'de> Deserialize<'de> for SetDoc
impl<'de> Deserialize<'de> for SetDoc
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
Auto Trait Implementations§
impl Freeze for SetDoc
impl RefUnwindSafe for SetDoc
impl Send for SetDoc
impl Sync for SetDoc
impl Unpin for SetDoc
impl UnwindSafe for SetDoc
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