pub struct Operation {
pub collection: CollectionName,
pub command: Command,
}
Expand description
A single operation performed on a Collection
.
Fields
collection: CollectionName
The id of the Collection
.
command: Command
The command being performed.
Implementations
Inserts a new document with contents
into collection
. If id
is
None
a unique id will be generated. If an id is provided and a
document already exists with that id, a conflict error will be returned.
pub fn insert_serialized<C>(
id: Option<u64>,
contents: &<C as SerializedCollection>::Contents
) -> Result<Operation, Error> where
C: SerializedCollection,
pub fn insert_serialized<C>(
id: Option<u64>,
contents: &<C as SerializedCollection>::Contents
) -> Result<Operation, Error> where
C: SerializedCollection,
Inserts a new document with the serialized representation of contents
into collection
. If id
is None
a unique id will be generated. If
an id is provided and a document already exists with that id, a conflict
error will be returned.
Updates a document in collection
.
pub fn update_serialized<C>(
header: Header,
contents: &<C as SerializedCollection>::Contents
) -> Result<Operation, Error> where
C: SerializedCollection,
pub fn update_serialized<C>(
header: Header,
contents: &<C as SerializedCollection>::Contents
) -> Result<Operation, Error> where
C: SerializedCollection,
Updates a document with the serialized representation of contents
in
collection
.
Deletes a document from a collection
.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Operation, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Operation, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
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
Auto Trait Implementations
impl RefUnwindSafe for Operation
impl UnwindSafe for Operation
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