pub struct Assignments<T> { /* private fields */ }Expand description
A SET list that is known non-empty, which is the only kind that has a
SQL form. Every *Update derives Default, and that value — what a
PATCH handler holds when the request changed nothing — has no
assignments at all, so the check belongs where such a value enters a
statement rather than at rendering time.
Implementations§
Source§impl<T: Table> Assignments<T>
impl<T: Table> Assignments<T>
Source§impl<T> Assignments<T>
impl<T> Assignments<T>
Sourcepub fn from_row<R: UpdateRow<Table = T>>(row: R) -> Result<Self, NothingToSet>
pub fn from_row<R: UpdateRow<Table = T>>(row: R) -> Result<Self, NothingToSet>
The SET list a request struct describes — the one fallible step
in building a statement, since a *Update whose every field is
untouched describes no assignment. Mixed with computed ones as
Assignments::from_row(patch)?.and_set_to(col, expr).
Trait Implementations§
Source§impl<T> Clone for Assignments<T>
impl<T> Clone for Assignments<T>
Auto Trait Implementations§
impl<T> Freeze for Assignments<T>
impl<T> RefUnwindSafe for Assignments<T>
impl<T> Send for Assignments<T>
impl<T> Sync for Assignments<T>
impl<T> Unpin for Assignments<T>
impl<T> UnsafeUnpin for Assignments<T>
impl<T> UnwindSafe for Assignments<T>
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