pub trait FromRouteSegment: Sized {
    type Err;

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

Something that can be created from a route segment.

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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: FromStr> FromRouteSegment for T
where <T as FromStr>::Err: Display,

§

type Err = <T as FromStr>::Err