Struct dynamodb_expression::update::set::if_not_exists::Builder
source · pub struct Builder { /* private fields */ }
Expand description
Builds an IfNotExists
instance. Create an instance of this by using IfNotExists::builder
.
See also: Path::if_not_exists
Implementations§
source§impl Builder
impl Builder
sourcepub fn src<T>(self, src: T) -> Selfwhere
T: Into<Path>,
pub fn src<T>(self, src: T) -> Selfwhere T: Into<Path>,
Sets the source Path
to check for existence.
Defaults to the destination Path
.
let if_not_exists = Path::new_name("foo")
.if_not_exists()
.src(Path::new_name("bar"))
.assign(Num::new(42));
assert_eq!("foo = if_not_exists(bar, 42)", if_not_exists.to_string());
Compare with the default, where the destination Path
is used:
let if_not_exists = Path::new_name("foo")
.if_not_exists()
.assign(Num::new(42));
assert_eq!("foo = if_not_exists(foo, 42)", if_not_exists.to_string());
sourcepub fn assign<T>(self, value: T) -> IfNotExistswhere
T: Into<Value>,
pub fn assign<T>(self, value: T) -> IfNotExistswhere T: Into<Value>,
The value to conditionally set.
Consumes this Builder
and creates an IfNotExists
instance.
See also: Path::if_not_exists
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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<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.