Trait FromRouteSegment

Source
pub trait FromRouteSegment: Sized {
    type Err;

    // Required method
    fn from_route_segment(route: &str) -> Result<Self, Self::Err>;
}

Required Associated Types§

Source

type Err

The error that can occur when parsing a route segment.

Required Methods§

Source

fn from_route_segment(route: &str) -> Result<Self, Self::Err>

Create an instance of Self from a route segment.

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<T> FromRouteSegment for T
where T: FromStr, <T as FromStr>::Err: Display,

Source§

type Err = <T as FromStr>::Err