Struct dynamodb_expression::update::set::list_append::Builder
source · pub struct Builder { /* private fields */ }
Expand description
Builds an ListAppend
instance.
See also: Path::list_append
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 read the initial list from.
Defaults to the Path
the combined list is being assigned to.
let list_append = Path::new_name("foo")
.list_append()
.src(Path::new_name("bar"))
.list([1, 2, 3].map(Num::new));
assert_eq!("foo = list_append(bar, [1, 2, 3])", list_append.to_string());
Compare with what happens without specifying a source Path
:
let list_append = Path::new_name("foo")
.list_append()
.list([1, 2, 3].map(Num::new));
assert_eq!("foo = list_append(foo, [1, 2, 3])", list_append.to_string());
sourcepub fn after(self) -> Self
pub fn after(self) -> Self
The new values will be appended to the end of the existing values.
This is the default.
let list_append = Path::new_name("foo").list_append().after().list([1, 2, 3].map(Num::new));
assert_eq!("foo = list_append(foo, [1, 2, 3])", list_append.to_string());
Compare with when before
is used:
let list_append = Path::new_name("foo").list_append().before().list([1, 2, 3].map(Num::new));
assert_eq!("foo = list_append([1, 2, 3], foo)", list_append.to_string());
The default, with the same behavior as after
:
let list_append = Path::new_name("foo").list_append().list([1, 2, 3].map(Num::new));
assert_eq!("foo = list_append(foo, [1, 2, 3])", list_append.to_string());
sourcepub fn before(self) -> Self
pub fn before(self) -> Self
The new values will be placed before the existing values.
Defaults to appending new values after
existing values.
let list_append = Path::new_name("foo").list_append().before().list([1, 2, 3].map(Num::new));
assert_eq!("foo = list_append([1, 2, 3], foo)", list_append.to_string());
Compare with when after
is used:
let list_append = Path::new_name("foo").list_append().after().list([1, 2, 3].map(Num::new));
assert_eq!("foo = list_append(foo, [1, 2, 3])", list_append.to_string());
The default, with the same behavior as after
:
let list_append = Path::new_name("foo").list_append().list([1, 2, 3].map(Num::new));
assert_eq!("foo = list_append(foo, [1, 2, 3])", list_append.to_string());
sourcepub fn list<T>(self, list: T) -> ListAppendwhere
T: Into<List>,
pub fn list<T>(self, list: T) -> ListAppendwhere T: Into<List>,
Sets the new value(s) to concatenate with the specified field.
Consumes this Builder
and creates a ListAppend
instance.
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.