pub struct SubmittedField<'a> { /* private fields */ }Expand description
A field type: behaviour registered once per string key. What a field sees of the submission when it produces its stored value.
A scalar field wants value, the single entry under its own
name. A field made of more than one control (a repeater, a checkbox list)
reads its own keys with nested: the whole submission is
here because a field’s shape is the field’s business, not the form’s.
Implementations§
Source§impl<'a> SubmittedField<'a>
impl<'a> SubmittedField<'a>
pub fn new(name: &'a str, data: &'a HashMap<String, String>) -> Self
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
This field’s submitted name, which a multi-value field uses as the prefix of its own keys.
Sourcepub fn value(&self) -> Option<&str>
pub fn value(&self) -> Option<&str>
The value submitted under this field’s own name.
None when the submission omits the field, which is how an unchecked
checkbox arrives.
Auto Trait Implementations§
impl<'a> Freeze for SubmittedField<'a>
impl<'a> RefUnwindSafe for SubmittedField<'a>
impl<'a> Send for SubmittedField<'a>
impl<'a> Sync for SubmittedField<'a>
impl<'a> Unpin for SubmittedField<'a>
impl<'a> UnsafeUnpin for SubmittedField<'a>
impl<'a> UnwindSafe for SubmittedField<'a>
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more