Enum patternfly_yew::validation::Validator
source · pub enum Validator<T, S> {
None,
Custom(Rc<dyn Fn(ValidationContext<T>) -> S>),
}
Variants§
None
Custom(Rc<dyn Fn(ValidationContext<T>) -> S>)
Implementations§
source§impl<T, S> Validator<T, S>
impl<T, S> Validator<T, S>
pub fn is_custom(&self) -> bool
sourcepub fn run<C>(&self, ctx: C) -> Option<S>where
C: Into<ValidationContext<T>>,
pub fn run<C>(&self, ctx: C) -> Option<S>where
C: Into<ValidationContext<T>>,
Convert into the context and run
sourcepub fn run_if<F>(&self, f: F) -> Option<S>where
F: FnOnce() -> ValidationContext<T>,
pub fn run_if<F>(&self, f: F) -> Option<S>where
F: FnOnce() -> ValidationContext<T>,
Only convert when necessary, and run.
sourcepub fn run_ctx(&self, ctx: ValidationContext<T>) -> Option<S>
pub fn run_ctx(&self, ctx: ValidationContext<T>) -> Option<S>
Run with the provided context.
Trait Implementations§
Auto Trait Implementations§
impl<T, S> Freeze for Validator<T, S>
impl<T, S> !RefUnwindSafe for Validator<T, S>
impl<T, S> !Send for Validator<T, S>
impl<T, S> !Sync for Validator<T, S>
impl<T, S> Unpin for Validator<T, S>
impl<T, S> !UnwindSafe for Validator<T, S>
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
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> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.