pub struct Mutation {
pub base_version: Option<i64>,
pub delete: Option<Key>,
pub insert: Option<Entity>,
pub property_mask: Option<PropertyMask>,
pub update: Option<Entity>,
pub update_time: Option<DateTime<Utc>>,
pub upsert: Option<Entity>,
}
Expand description
A mutation to apply to an entity.
This type is not used in any activity, and only used as part of another schema.
Fields§
§base_version: Option<i64>
The version of the entity that this mutation is being applied to. If this does not match the current version on the server, the mutation conflicts.
delete: Option<Key>
The key of the entity to delete. The entity may or may not already exist. Must have a complete key path and must not be reserved/read-only.
insert: Option<Entity>
The entity to insert. The entity must not already exist. The entity key’s final path element may be incomplete.
property_mask: Option<PropertyMask>
The properties to write in this mutation. None of the properties in the mask may have a reserved name, except for __key__
. This field is ignored for delete
. If the entity already exists, only properties referenced in the mask are updated, others are left untouched. Properties referenced in the mask but not in the entity are deleted.
update: Option<Entity>
The entity to update. The entity must already exist. Must have a complete key path.
update_time: Option<DateTime<Utc>>
The update time of the entity that this mutation is being applied to. If this does not match the current update time on the server, the mutation conflicts.
upsert: Option<Entity>
The entity to upsert. The entity may or may not already exist. The entity key’s final path element may be incomplete.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mutation
impl<'de> Deserialize<'de> for Mutation
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>,
impl Part 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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>
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>
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