Struct krill::commons::api::ChildConnectionStats
source · pub struct ChildConnectionStats { /* private fields */ }
Implementations§
source§impl ChildConnectionStats
impl ChildConnectionStats
pub fn new( handle: ChildHandle, last_exchange: Option<ChildExchange>, state: ChildState ) -> Self
sourcepub fn is_suspension_candidate(&self, threshold_seconds: i64) -> bool
pub fn is_suspension_candidate(&self, threshold_seconds: i64) -> bool
The child is considered a candidate for suspension if:
- it is Krill 0.9.2-rc and up (see #670)
- the last exchange is longer ago than the specified threshold hours
- and the child is not already suspended
Trait Implementations§
source§impl Clone for ChildConnectionStats
impl Clone for ChildConnectionStats
source§fn clone(&self) -> ChildConnectionStats
fn clone(&self) -> ChildConnectionStats
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ChildConnectionStats
impl Debug for ChildConnectionStats
source§impl<'de> Deserialize<'de> for ChildConnectionStats
impl<'de> Deserialize<'de> for ChildConnectionStats
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ChildConnectionStats
impl PartialEq for ChildConnectionStats
source§fn eq(&self, other: &ChildConnectionStats) -> bool
fn eq(&self, other: &ChildConnectionStats) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ChildConnectionStats
impl Serialize for ChildConnectionStats
impl Eq for ChildConnectionStats
impl StructuralEq for ChildConnectionStats
impl StructuralPartialEq for ChildConnectionStats
Auto Trait Implementations§
impl RefUnwindSafe for ChildConnectionStats
impl Send for ChildConnectionStats
impl Sync for ChildConnectionStats
impl Unpin for ChildConnectionStats
impl UnwindSafe for ChildConnectionStats
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.