pub struct Math { /* private fields */ }Expand description
Represents a DynamoDB math operation used as a part of an update expression.
See also: Update
Examples
use dynamodb_expression::{path::{Name, Path}, update::Math};
let math = Math::builder(Name::from("foo")).add(4);
assert_eq!("foo = foo + 4", math.to_string());
let math_2 = Path::from(Name::from("foo")).math().add(4);
assert_eq!(math, math_2);
let math = Math::builder(Name::from("foo")).src(Name::from("bar")).sub(7);
assert_eq!("foo = bar - 7", math.to_string());
let math_2 = Path::from(Name::from("foo")).math().src(Name::from("bar")).sub(7);
assert_eq!(math, math_2);Implementations§
Trait Implementations§
source§impl PartialEq for Math
impl PartialEq for Math
impl Eq for Math
impl StructuralEq for Math
impl StructuralPartialEq for Math
Auto Trait Implementations§
impl RefUnwindSafe for Math
impl Send for Math
impl Sync for Math
impl Unpin for Math
impl UnwindSafe for Math
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Creates a shared type from an unshared type.