pub struct NavigationProgress { /* private fields */ }Expand description
Attempt bookkeeping every consumer otherwise re-implements: because attempts may overlap (WebView2), a terminal event for an older attempt must not clear loading UI for the newest one.
Implementations§
Sourcepub fn apply(&mut self, event: &NavigationEvent)
pub fn apply(&mut self, event: &NavigationEvent)
Fold one event into the progress state.
Sourcepub fn is_loading(&self) -> bool
pub fn is_loading(&self) -> bool
True while the newest attempt has no terminal event.
Sourcepub fn current(&self) -> Option<NavigationId>
pub fn current(&self) -> Option<NavigationId>
The newest attempt, until its terminal arrives.
Sourcepub fn is_current(&self, id: NavigationId) -> bool
pub fn is_current(&self, id: NavigationId) -> bool
Whether id is the newest attempt (terminal or not).
Trait Implementations§
Source§fn default() -> NavigationProgress
fn default() -> NavigationProgress
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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