pub struct HashHistory { /* private fields */ }Expand description
A dioxus_history::History provider that integrates with a browser via the History API
but uses the url fragment for the route. This allows serving as a single html file or on a single url path.
Implementations§
Source§impl HashHistory
 
impl HashHistory
Sourcepub fn new(do_scroll_restoration: bool) -> Self
 
pub fn new(do_scroll_restoration: bool) -> Self
Create a new HashHistory.
If do_scroll_restoration is true, HashHistory will take control of the history
state. It’ll also set the browsers scroll restoration to manual.
Trait Implementations§
Source§impl Default for HashHistory
 
impl Default for HashHistory
Source§impl History for HashHistory
 
impl History for HashHistory
Source§fn current_route(&self) -> String
 
fn current_route(&self) -> String
Get the path of the current URL. Read more
Source§fn go_forward(&self)
 
fn go_forward(&self)
Go forward to a future page. Read more
Source§fn can_go_back(&self) -> bool
 
fn can_go_back(&self) -> bool
Check whether there is a previous page to navigate back to. Read more
Source§fn can_go_forward(&self) -> bool
 
fn can_go_forward(&self) -> bool
Check whether there is a future page to navigate forward to. Read more
Source§fn include_prevent_default(&self) -> bool
 
fn include_prevent_default(&self) -> bool
Whether the router should include the legacy prevent default attribute instead of the new
prevent default method. This should only be used by liveview.
Auto Trait Implementations§
impl Freeze for HashHistory
impl RefUnwindSafe for HashHistory
impl !Send for HashHistory
impl !Sync for HashHistory
impl Unpin for HashHistory
impl UnwindSafe for HashHistory
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
Mutably borrows from an owned value. Read more
Source§impl<T> InitializeFromFunction<T> for T
 
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
 
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
 
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
 
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
    O: From<T>,
 
impl<T, O> SuperFrom<T> for Owhere
    O: From<T>,
Source§fn super_from(input: T) -> O
 
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
    O: SuperFrom<T, M>,
 
impl<T, O, M> SuperInto<O, M> for Twhere
    O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
 
fn super_into(self) -> O
Convert from a type to another type.