pub trait Routable:
FromStr
+ Display
+ Clone
+ 'static{
const SITE_MAP: &'static [SiteMapSegment];
// Required method
fn render(&self, level: usize) -> Element;
// Provided methods
fn is_child_of(&self, other: &Self) -> bool { ... }
fn parent(&self) -> Option<Self> { ... }
fn flatten_site_map<'a>( ) -> FlatMap<Iter<'a, SiteMapSegment>, Vec<Vec<SegmentType>>, fn(&SiteMapSegment) -> Vec<Vec<SegmentType>>> { ... }
fn static_routes() -> Vec<Self> { ... }
}Required Associated Constants§
Sourceconst SITE_MAP: &'static [SiteMapSegment]
const SITE_MAP: &'static [SiteMapSegment]
The error that can occur when parsing a route.
Required Methods§
Provided Methods§
Sourcefn is_child_of(&self, other: &Self) -> bool
fn is_child_of(&self, other: &Self) -> bool
Checks if this route is a child of the given route.
Sourcefn flatten_site_map<'a>() -> FlatMap<Iter<'a, SiteMapSegment>, Vec<Vec<SegmentType>>, fn(&SiteMapSegment) -> Vec<Vec<SegmentType>>>
fn flatten_site_map<'a>() -> FlatMap<Iter<'a, SiteMapSegment>, Vec<Vec<SegmentType>>, fn(&SiteMapSegment) -> Vec<Vec<SegmentType>>>
Returns a flattened version of Self::SITE_MAP.
Sourcefn static_routes() -> Vec<Self>
fn static_routes() -> Vec<Self>
Gets a list of all the static routes.
Example static route: #[route("/static/route")]
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.