pub struct GoRouterState { /* private fields */ }Expand description
Where a page is: what location it was reached at, which route it is, and what the
location said — the values of the path’s :parameters, and the query.
Implementations§
Source§impl GoRouterState
impl GoRouterState
Sourcepub fn entering(&self) -> f32
pub fn entering(&self) -> f32
How far into view this page is: 1.0 once it has settled, and while a transition
brings it in or takes it out, the number that transition is driven by — 0.0 not yet
arrived. A page that wants to move its own contents as it arrives reads it, and one
that does not ignores it.
Sourcepub fn path(&self) -> &str
pub fn path(&self) -> &str
The pattern of the route that answered: /users/:id. Empty when no route did.
Sourcepub fn param(&self, name: &str) -> Option<&str>
pub fn param(&self, name: &str) -> Option<&str>
The value of the path parameter name — 42 for :id in /users/42.
Sourcepub fn query(&self, name: &str) -> Option<&str>
pub fn query(&self, name: &str) -> Option<&str>
The value of the query parameter name — posts for tab in ?tab=posts. When it
is given more than once, the last one.
Sourcepub fn query_params(&self) -> &HashMap<String, String>
pub fn query_params(&self) -> &HashMap<String, String>
Every query parameter of the location.
Sourcepub fn extra<T>(&self) -> Option<Rc<T>>where
T: 'static,
pub fn extra<T>(&self) -> Option<Rc<T>>where
T: 'static,
The object that came along with the navigation (GoRouter::go_with_extra), if it
is a T.
Trait Implementations§
Source§impl Clone for GoRouterState
impl Clone for GoRouterState
Source§fn clone(&self) -> GoRouterState
fn clone(&self) -> GoRouterState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for GoRouterState
impl !Send for GoRouterState
impl !Sync for GoRouterState
impl !UnwindSafe for GoRouterState
impl Freeze for GoRouterState
impl Unpin for GoRouterState
impl UnsafeUnpin for GoRouterState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.