[][src]Struct yew_router::Route

pub struct Route<T> {
    pub path_segments: Vec<String>,
    pub query: Option<String>,
    pub fragment: Option<String>,
    pub state: T,
}

A single route abstraction

Fields

path_segments: Vec<String>

The URL path segments

query: Option<String>

The URL query part

fragment: Option<String>

The URL fragment part

state: T

The routes state

Methods

impl<T> Route<T> where
    T: JsSerialize + Clone + TryFrom<Value> + Default + 'static, 
[src]

pub fn to_route_string(&self) -> String[src]

Convert to a String

pub fn current_route(route_service: &RouterService<T>) -> Fallible<Self>[src]

Retrieve the current route

Trait Implementations

impl<T: PartialEq> PartialEq<Route<T>> for Route<T>[src]

impl<T: Default> Default for Route<T>[src]

impl<T: Clone> Clone for Route<T>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: Debug> Debug for Route<T>[src]

impl<T> Serialize for Route<T> where
    T: Serialize
[src]

impl<'de, T> Deserialize<'de> for Route<T> where
    T: Deserialize<'de>, 
[src]

impl<T> Transferable for Route<T> where
    T: Serialize + Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<T> Send for Route<T> where
    T: Send

impl<T> Unpin for Route<T> where
    T: Unpin

impl<T> Sync for Route<T> where
    T: Sync

impl<T> UnwindSafe for Route<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for Route<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: Any

impl<T> CloneAny for T where
    T: Clone + Any