FromNonEmptyStr

Trait FromNonEmptyStr 

Source
pub trait FromNonEmptyStr: Sized {
    type Error;

    // Required method
    fn from_non_empty_str(string: &NonEmptyStr) -> Result<Self, Self::Error>;
}
Expand description

Parsing values from non-empty strings.

Required Associated Types§

Source

type Error

The associated error type returned when parsing fails.

Required Methods§

Source

fn from_non_empty_str(string: &NonEmptyStr) -> Result<Self, Self::Error>

Parses Self from the given non-empty string.

§Errors

Returns Self::Error if parsing fails.

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§

Source§

impl FromNonEmptyStr for NonEmptyString

Available on crate features std or alloc only.