pub struct NoForm<M>(/* private fields */);Expand description
The record form of a resource with no create or edit page.
A list-only resource names it as Resource::Form:
type Form = NoForm<Self::Model>;. fields and
hydrate are empty and
into_update answers None. No route parses or
writes it, so parse and
into_create panic naming the model, and the
future exec_update returns panics when polled.
Trait Implementations§
Source§impl<M> FormFields for NoForm<M>
impl<M> FormFields for NoForm<M>
Source§impl<M> RecordForm for NoForm<M>
impl<M> RecordForm for NoForm<M>
Source§const HAS_FORM: bool = false
const HAS_FORM: bool = false
Whether the resource naming this form has create and edit pages. Read more
Source§fn fields() -> Vec<FormField<<NoForm<M> as FormFields>::Field>>
fn fields() -> Vec<FormField<<NoForm<M> as FormFields>::Field>>
Every field, in declaration order, with the keys it binds.
Source§fn hydrate(_cx: &Cx, _record: &M) -> FormValues
fn hydrate(_cx: &Cx, _record: &M) -> FormValues
The stored record as the form spells it.
Source§fn parse(_cx: &Cx, _values: &FormValues) -> Result<NoForm<M>, Vec<FieldError>>
fn parse(_cx: &Cx, _values: &FormValues) -> Result<NoForm<M>, Vec<FieldError>>
Parse a completed submission: the form’s only presence and type check. Read more
Source§fn into_create(self) -> <M as Model>::Create
fn into_create(self) -> <M as Model>::Create
The create builder with every field set.
Source§fn into_update<'a>(
self,
_record: &'a mut M,
_named: &HashSet<<NoForm<M> as FormFields>::Field>,
) -> Option<<M as Model>::Update<'a>>
fn into_update<'a>( self, _record: &'a mut M, _named: &HashSet<<NoForm<M> as FormFields>::Field>, ) -> Option<<M as Model>::Update<'a>>
The instance update builder with one assignment per named field, or
None when no field is named. Read moreSource§fn exec_update<'a>(
update: <M as Model>::Update<'a>,
ex: &'a mut dyn Executor,
) -> impl Future<Output = Result<(), Error>> + Send + 'a
fn exec_update<'a>( update: <M as Model>::Update<'a>, ex: &'a mut dyn Executor, ) -> impl Future<Output = Result<(), Error>> + Send + 'a
Execute a builder
Self::into_update returned. Read moreSource§fn includes() -> Includes<Self::Model>
fn includes() -> Includes<Self::Model>
The relations
hydrate reads off the record: each many-to-many field’s,
which the edit page and the edit’s write load the record with.Source§fn links(&self) -> Vec<(Self::Field, Vec<String>)>
fn links(&self) -> Vec<(Self::Field, Vec<String>)>
The records each many-to-many field holds, as their keys’ form spelling: what
write_create links a new record to, and what
write_update leaves a posted field’s record linked to.Auto Trait Implementations§
impl<M> Freeze for NoForm<M>
impl<M> RefUnwindSafe for NoForm<M>
impl<M> Send for NoForm<M>
impl<M> Sync for NoForm<M>
impl<M> Unpin for NoForm<M>
impl<M> UnsafeUnpin for NoForm<M>
impl<M> UnwindSafe for NoForm<M>
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