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: Model + IntoExpr<M> + Send + Sync + 'static> RecordForm for NoForm<M>
impl<M: Model + IntoExpr<M> + Send + Sync + 'static> 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§type Field = !
type Field = !
One variant per form field: the key
Posted uses. Its bound form keys
are Self::fields’.Source§fn fields() -> Vec<FormField<Self::Field>>
fn fields() -> Vec<FormField<Self::Field>>
Every field, in declaration order, with the keys it binds.
Source§fn hydrate(_cx: &Cx, _record: &M) -> HashMap<String, String>
fn hydrate(_cx: &Cx, _record: &M) -> HashMap<String, String>
The stored record as the form spells it.
Source§fn parse(
_cx: &Cx,
_values: &HashMap<String, String>,
) -> Result<Self, Vec<FieldError>>
fn parse( _cx: &Cx, _values: &HashMap<String, String>, ) -> Result<Self, Vec<FieldError>>
Parse a completed, normalized submission. Read more
Source§fn into_create(self) -> M::Create
fn into_create(self) -> M::Create
The create builder with every field set.
Source§fn into_update<'a>(
self,
_record: &'a mut M,
_named: &HashSet<Self::Field>,
) -> Option<M::Update<'a>>
fn into_update<'a>( self, _record: &'a mut M, _named: &HashSet<Self::Field>, ) -> Option<M::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::Update<'a>,
ex: &'a mut dyn Executor,
) -> impl Future<Output = Result<()>> + Send + 'a
fn exec_update<'a>( update: M::Update<'a>, ex: &'a mut dyn Executor, ) -> impl Future<Output = Result<()>> + Send + 'a
Execute a builder
Self::into_update returned. Read moreAuto 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