pub struct FieldValidator { /* private fields */ }Expand description
An application-supplied field validator with an explicit semantic revision.
The closure runs in the shared decode stage, so interactive, file, and
stdin answers are validated identically. Because closure semantics cannot
be fingerprinted, the application declares an explicit revision string
that does enter the fingerprint: bump the
revision whenever the validator’s accepted values change, and previously
rendered sheets are invalidated exactly like any other semantic change.
Error messages returned by the closure are shown to users in diagnostics; they should describe the rule without echoing the submitted value.
Implementations§
Trait Implementations§
Source§impl Clone for FieldValidator
impl Clone for FieldValidator
Source§fn clone(&self) -> FieldValidator
fn clone(&self) -> FieldValidator
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FieldValidator
impl Debug for FieldValidator
impl Eq for FieldValidator
Source§impl PartialEq for FieldValidator
Equality compares the semantic revision only; the closure itself is not
comparable, and the revision is the declared semantic identity.
impl PartialEq for FieldValidator
Equality compares the semantic revision only; the closure itself is not comparable, and the revision is the declared semantic identity.
Auto Trait Implementations§
impl !RefUnwindSafe for FieldValidator
impl !UnwindSafe for FieldValidator
impl Freeze for FieldValidator
impl Send for FieldValidator
impl Sync for FieldValidator
impl Unpin for FieldValidator
impl UnsafeUnpin for FieldValidator
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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