Struct rustful::handler::routing::RouteState
[−]
[src]
pub struct RouteState<'a> { /* fields omitted */ }
A state object for routing.
Methods
impl<'a> RouteState<'a>
[src]
impl<'a> RouteState<'a>
pub fn get(&self) -> Option<&'a [u8]>
[src]
pub fn get(&self) -> Option<&'a [u8]>
Get the current path segment.
pub fn skip(&mut self)
[src]
pub fn skip(&mut self)
Don't include this path segment in a variable.
pub fn keep(&mut self)
[src]
pub fn keep(&mut self)
Include this path segment as a variable.
pub fn fuse(&mut self)
[src]
pub fn fuse(&mut self)
Extend a previously saved variable value with this path segment, or save it as a new variable.
pub fn variables(
&self,
names: &[MaybeUtf8Owned]
) -> HashMap<MaybeUtf8Owned, MaybeUtf8Owned>
[src]
pub fn variables(
&self,
names: &[MaybeUtf8Owned]
) -> HashMap<MaybeUtf8Owned, MaybeUtf8Owned>
Assign names to the saved variables and return them.
pub fn snapshot(&self) -> (usize, usize)
[src]
pub fn snapshot(&self) -> (usize, usize)
Get a snapshot of a part of the current state.
pub fn go_to(&mut self, snapshot: (usize, usize))
[src]
pub fn go_to(&mut self, snapshot: (usize, usize))
Go to a previously recorded state.
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
Check if there are no more segments.
Trait Implementations
impl<'a> Clone for RouteState<'a>
[src]
impl<'a> Clone for RouteState<'a>
fn clone(&self) -> RouteState<'a>
[src]
fn clone(&self) -> RouteState<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<'a, R: Route<'a> + ?Sized> From<&'a R> for RouteState<'a>
[src]
impl<'a, R: Route<'a> + ?Sized> From<&'a R> for RouteState<'a>
fn from(route: &'a R) -> RouteState<'a>
[src]
fn from(route: &'a R) -> RouteState<'a>
Performs the conversion.
Auto Trait Implementations
impl<'a> Send for RouteState<'a>
impl<'a> Send for RouteState<'a>
impl<'a> Sync for RouteState<'a>
impl<'a> Sync for RouteState<'a>