pub struct Activity { /* private fields */ }Expand description
A cloneable view of when the endpoint last served a request.
Implementations§
Source§impl Activity
impl Activity
Sourcepub fn has_seen_activity(&self) -> bool
pub fn has_seen_activity(&self) -> bool
Whether any request has ever arrived.
Sourcepub fn is_idle_for(&self, idle: Duration) -> bool
pub fn is_idle_for(&self, idle: Duration) -> bool
Whether the endpoint has been quiet for at least idle.
An endpoint that has never served a request counts as idle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Activity
impl RefUnwindSafe for Activity
impl Send for Activity
impl Sync for Activity
impl Unpin for Activity
impl UnsafeUnpin for Activity
impl UnwindSafe for Activity
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