#[non_exhaustive]pub struct Mutation {
pub operation: Option<Operation>,
/* private fields */
}Expand description
A modification to one or more Cloud Spanner rows. Mutations can be applied to a Cloud Spanner database by sending them in a Commit call.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.operation: Option<Operation>Required. The operation to perform.
Implementations§
Source§impl Mutation
impl Mutation
Sourcepub fn set_operation<T: Into<Option<Operation>>>(self, v: T) -> Self
pub fn set_operation<T: Into<Option<Operation>>>(self, v: T) -> Self
Sets the value of operation.
Note that all the setters affecting operation are mutually
exclusive.
Sourcepub fn insert(&self) -> Option<&Box<Write>>
pub fn insert(&self) -> Option<&Box<Write>>
The value of operation
if it holds a Insert, None if the field is not set or
holds a different branch.
Sourcepub fn set_insert<T: Into<Box<Write>>>(self, v: T) -> Self
pub fn set_insert<T: Into<Box<Write>>>(self, v: T) -> Self
Sets the value of operation
to hold a Insert.
Note that all the setters affecting operation are
mutually exclusive.
Sourcepub fn update(&self) -> Option<&Box<Write>>
pub fn update(&self) -> Option<&Box<Write>>
The value of operation
if it holds a Update, None if the field is not set or
holds a different branch.
Sourcepub fn set_update<T: Into<Box<Write>>>(self, v: T) -> Self
pub fn set_update<T: Into<Box<Write>>>(self, v: T) -> Self
Sets the value of operation
to hold a Update.
Note that all the setters affecting operation are
mutually exclusive.
Sourcepub fn insert_or_update(&self) -> Option<&Box<Write>>
pub fn insert_or_update(&self) -> Option<&Box<Write>>
The value of operation
if it holds a InsertOrUpdate, None if the field is not set or
holds a different branch.
Sourcepub fn set_insert_or_update<T: Into<Box<Write>>>(self, v: T) -> Self
pub fn set_insert_or_update<T: Into<Box<Write>>>(self, v: T) -> Self
Sets the value of operation
to hold a InsertOrUpdate.
Note that all the setters affecting operation are
mutually exclusive.
Sourcepub fn replace(&self) -> Option<&Box<Write>>
pub fn replace(&self) -> Option<&Box<Write>>
The value of operation
if it holds a Replace, None if the field is not set or
holds a different branch.
Sourcepub fn set_replace<T: Into<Box<Write>>>(self, v: T) -> Self
pub fn set_replace<T: Into<Box<Write>>>(self, v: T) -> Self
Sets the value of operation
to hold a Replace.
Note that all the setters affecting operation are
mutually exclusive.
Sourcepub fn delete(&self) -> Option<&Box<Delete>>
pub fn delete(&self) -> Option<&Box<Delete>>
The value of operation
if it holds a Delete, None if the field is not set or
holds a different branch.
Sourcepub fn set_delete<T: Into<Box<Delete>>>(self, v: T) -> Self
pub fn set_delete<T: Into<Box<Delete>>>(self, v: T) -> Self
Sets the value of operation
to hold a Delete.
Note that all the setters affecting operation are
mutually exclusive.
Sourcepub fn send(&self) -> Option<&Box<Send>>
pub fn send(&self) -> Option<&Box<Send>>
The value of operation
if it holds a Send, None if the field is not set or
holds a different branch.
Sourcepub fn set_send<T: Into<Box<Send>>>(self, v: T) -> Self
pub fn set_send<T: Into<Box<Send>>>(self, v: T) -> Self
Sets the value of operation
to hold a Send.
Note that all the setters affecting operation are
mutually exclusive.
Trait Implementations§
impl StructuralPartialEq for Mutation
Auto Trait Implementations§
impl Freeze for Mutation
impl RefUnwindSafe for Mutation
impl Send for Mutation
impl Sync for Mutation
impl Unpin for Mutation
impl UnsafeUnpin for Mutation
impl UnwindSafe for Mutation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request