pub struct PropsBuilder<P> { /* private fields */ }
Expand description
Builder for constructing component props with validation
Implementations§
Source§impl<P> PropsBuilder<P>
impl<P> PropsBuilder<P>
Sourcepub fn with_validator<V>(self, validator: V) -> Self
pub fn with_validator<V>(self, validator: V) -> Self
Set a validator for the props
Sourcepub fn build(self) -> Result<P, PropValidationError>
pub fn build(self) -> Result<P, PropValidationError>
Build the props, running validation
Auto Trait Implementations§
impl<P> Freeze for PropsBuilder<P>where
P: Freeze,
impl<P> !RefUnwindSafe for PropsBuilder<P>
impl<P> Send for PropsBuilder<P>where
P: Send,
impl<P> Sync for PropsBuilder<P>where
P: Sync,
impl<P> Unpin for PropsBuilder<P>where
P: Unpin,
impl<P> !UnwindSafe for PropsBuilder<P>
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