Struct IdleTimeout
pub struct IdleTimeout(/* private fields */);Available on crate feature
quic only.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§
§impl Clone for IdleTimeout
impl Clone for IdleTimeout
§fn clone(&self) -> IdleTimeout
fn clone(&self) -> IdleTimeout
Returns a duplicate 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 more§impl Debug for IdleTimeout
impl Debug for IdleTimeout
§impl Default for IdleTimeout
impl Default for IdleTimeout
§fn default() -> IdleTimeout
fn default() -> IdleTimeout
Returns the “default value” for a type. Read more
§impl From<VarInt> for IdleTimeout
impl From<VarInt> for IdleTimeout
§fn from(inner: VarInt) -> IdleTimeout
fn from(inner: VarInt) -> IdleTimeout
Converts to this type from the input type.
§impl Hash for IdleTimeout
impl Hash for IdleTimeout
§impl Ord for IdleTimeout
impl Ord for IdleTimeout
§impl PartialEq for IdleTimeout
impl PartialEq for IdleTimeout
§impl PartialOrd for IdleTimeout
impl PartialOrd for IdleTimeout
§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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more