Struct quinn_proto::IdleTimeout
source · pub struct IdleTimeout(/* private fields */);
Expand description
Maximum duration of inactivity to accept before timing out the connection.
This wraps an underlying VarInt
, representing the duration in milliseconds. Values can be
constructed by converting directly from VarInt
, or using TryFrom<Duration>
.
// A `VarInt`-encoded value in milliseconds
let timeout = IdleTimeout::from(VarInt::from_u32(10_000));
// Try to convert a `Duration` into a `VarInt`-encoded timeout
let timeout = IdleTimeout::try_from(Duration::from_secs(10))?;
Trait Implementations§
source§impl Clone for IdleTimeout
impl Clone for IdleTimeout
source§fn clone(&self) -> IdleTimeout
fn clone(&self) -> IdleTimeout
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 IdleTimeout
impl Debug for IdleTimeout
source§impl Default for IdleTimeout
impl Default for IdleTimeout
source§fn default() -> IdleTimeout
fn default() -> IdleTimeout
Returns the “default value” for a type. Read more
source§impl From<VarInt> for IdleTimeout
impl From<VarInt> for IdleTimeout
source§impl Hash for IdleTimeout
impl Hash for IdleTimeout
source§impl Ord for IdleTimeout
impl Ord for IdleTimeout
source§fn cmp(&self, other: &IdleTimeout) -> Ordering
fn cmp(&self, other: &IdleTimeout) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for IdleTimeout
impl PartialEq for IdleTimeout
source§impl PartialOrd for IdleTimeout
impl PartialOrd for IdleTimeout
source§impl TryFrom<Duration> for IdleTimeout
impl TryFrom<Duration> for IdleTimeout
impl Copy for IdleTimeout
impl Eq for IdleTimeout
impl StructuralPartialEq for IdleTimeout
Auto Trait Implementations§
impl Freeze for IdleTimeout
impl RefUnwindSafe for IdleTimeout
impl Send for IdleTimeout
impl Sync for IdleTimeout
impl Unpin for IdleTimeout
impl UnwindSafe for IdleTimeout
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)