pub struct Posted<F: RecordForm> { /* private fields */ }Expand description
An edit submission: the parsed form, and the fields the submission named.
Derefs to the form, so a record fn reads posted.author_id — the posted
value, or the stored one when the submission did not name the field.
Implementations§
Source§impl<F: RecordForm> Posted<F>
impl<F: RecordForm> Posted<F>
Sourcepub fn new(form: F, named: impl IntoIterator<Item = F::Field>) -> Self
pub fn new(form: F, named: impl IntoIterator<Item = F::Field>) -> Self
A posted form that names named.
Sourcepub fn into_update(
self,
record: &mut F::Model,
) -> Option<<F::Model as Model>::Update<'_>>
pub fn into_update( self, record: &mut F::Model, ) -> Option<<F::Model as Model>::Update<'_>>
The update builder assigning every named field, or None when the
submission named none. See RecordForm::into_update.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for Posted<F>
impl<F> RefUnwindSafe for Posted<F>
impl<F> Send for Posted<F>
impl<F> Sync for Posted<F>
impl<F> Unpin for Posted<F>
impl<F> UnsafeUnpin for Posted<F>
impl<F> UnwindSafe for Posted<F>
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