pub struct Valid<T>(/* private fields */);Expand description
Wrapper type containing a value which must have been validated.
Implementations§
Source§impl<T> Valid<T>
impl<T> Valid<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Unwrap into the contained value.
Source§impl<T: ValidateContext> Valid<T>
impl<T: ValidateContext> Valid<T>
pub fn try_new_ctx(inner: T, context: &T::Context) -> Result<Self>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Valid<T>where
T: Freeze,
impl<T> RefUnwindSafe for Valid<T>where
T: RefUnwindSafe,
impl<T> Send for Valid<T>where
T: Send,
impl<T> Sync for Valid<T>where
T: Sync,
impl<T> Unpin for Valid<T>where
T: Unpin,
impl<T> UnsafeUnpin for Valid<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Valid<T>where
T: UnwindSafe,
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