pub struct History;Implementations§
Source§impl History
impl History
Sourcepub fn listener<F: Fn() + 'static>(f: F) -> HistoryListener
pub fn listener<F: Fn() + 'static>(f: F) -> HistoryListener
Subscribe to events of the browser history.
This will receive events when popping items from the stack, as well as changes triggered by calling
History::push_state.
Sourcepub fn push_state(state: JsValue, url: &str) -> Result<(), JsValue>
pub fn push_state(state: JsValue, url: &str) -> Result<(), JsValue>
Push a new state to the history stack.
This will send out events and update the browser’s history. Ultimately calling
web_sys::History::push_state_with_url.
Sourcepub fn replace_state(state: JsValue, url: &str) -> Result<(), JsValue>
pub fn replace_state(state: JsValue, url: &str) -> Result<(), JsValue>
Replace current state in the history stack
This will send out events and update the browser’s history. Ultimately calling
web_sys::History::replace_state_with_url.
Auto Trait Implementations§
impl Freeze for History
impl RefUnwindSafe for History
impl Send for History
impl Sync for History
impl Unpin for History
impl UnsafeUnpin for History
impl UnwindSafe for History
Blanket Implementations§
impl<Token, Builder, How> AllPropsFor<Builder, How> for Tokenwhere
Builder: Buildable<Token>,
<Builder as Buildable<Token>>::WrappedToken: HasAllProps<<Builder as Buildable<Token>>::Output, How>,
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
impl<T> HasAllProps<(), T> for T
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<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.