pub enum Action {
Set(Value),
Increment(f64),
Append(Vec<Value>),
Prepend(Vec<Value>),
Delete,
}Expand description
Enum specifying the variants of actions to be performed when updating the item. The type contains factory methods to facilitate the construction of variants. Check deta docs for more information.
Variants§
Set(Value)
The attribute to be updated or created.
Increment(f64)
The attribute to be incremented. Increment value can be negative.
Append(Vec<Value>)
The attribute to append a values to.
Prepend(Vec<Value>)
The attribute to prepend a values to.
Delete
The attribute to be deleted.
Implementations§
Source§impl Action
Factory methods.
impl Action
Factory methods.
pub fn set<T>(value: T) -> Result<Self>where
T: Serialize,
pub fn increment<T>(value: T) -> Self
pub fn append<T>(value: T) -> Result<Self>where
T: Serialize,
pub fn append_many<T>(value: &[T]) -> Result<Self>where
T: Serialize,
pub fn prepend<T>(value: T) -> Result<Self>where
T: Serialize,
pub fn prepend_many<T>(value: &[T]) -> Result<Self>where
T: Serialize,
pub fn delete() -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
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