pub struct SessionTimer {
pub interval_secs: u32,
pub we_are_refresher: bool,
}Expand description
Negotiated session-timer state for one dialog, from our side’s perspective.
Fields§
§interval_secs: u32Negotiated session interval in seconds.
we_are_refresher: booltrue if we send the periodic refresh re-INVITEs; false if we
only watch for the peer’s refreshes and BYE on expiry.
Implementations§
Source§impl SessionTimer
impl SessionTimer
Sourcepub fn refresh_after(&self) -> Duration
pub fn refresh_after(&self) -> Duration
When the refresher sends its refresh: half the session interval after the last refresh (RFC 4028 §10).
Sourcepub fn expiry_after(&self) -> Duration
pub fn expiry_after(&self) -> Duration
When the non-refresher gives up and sends BYE: the session
interval minus min(32 s, interval / 3) after the last refresh
(RFC 4028 §10).
Trait Implementations§
Source§impl Clone for SessionTimer
impl Clone for SessionTimer
Source§fn clone(&self) -> SessionTimer
fn clone(&self) -> SessionTimer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SessionTimer
Source§impl Debug for SessionTimer
impl Debug for SessionTimer
impl Eq for SessionTimer
Source§impl PartialEq for SessionTimer
impl PartialEq for SessionTimer
Source§fn eq(&self, other: &SessionTimer) -> bool
fn eq(&self, other: &SessionTimer) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SessionTimer
Auto Trait Implementations§
impl Freeze for SessionTimer
impl RefUnwindSafe for SessionTimer
impl Send for SessionTimer
impl Sync for SessionTimer
impl Unpin for SessionTimer
impl UnsafeUnpin for SessionTimer
impl UnwindSafe for SessionTimer
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.