Trait mas_router::Route

source ·
pub trait Route {
    type Query: Serialize;

    // Required method
    fn route() -> &'static str;

    // Provided methods
    fn query(&self) -> Option<&Self::Query> { ... }
    fn path(&self) -> Cow<'static, str> { ... }
    fn path_and_query(&self) -> Cow<'static, str> { ... }
    fn absolute_url(&self, base: &Url) -> Url { ... }
}

Required Associated Types§

Required Methods§

source

fn route() -> &'static str

Provided Methods§

source

fn query(&self) -> Option<&Self::Query>

source

fn path(&self) -> Cow<'static, str>

source

fn path_and_query(&self) -> Cow<'static, str>

source

fn absolute_url(&self, base: &Url) -> Url

Object Safety§

This trait is not object safe.

Implementors§