ValidFrom

Trait ValidFrom 

Source
pub trait ValidFrom<T>: Sized {
    type Error;
    type Trace;

    // Required method
    fn valid_from(a: T) -> Valid<Self, Self::Error, Self::Trace>;
}
Expand description

Moral equivalent of TryFrom for validation purposes

Required Associated Types§

Required Methods§

Source

fn valid_from(a: T) -> Valid<Self, Self::Error, Self::Trace>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§