pub struct VarInt(/* private fields */);

Implementations§

source§

impl VarInt

source

pub const MAX: Self = _

source

pub const ZERO: Self = _

source

pub fn new(v: u64) -> Result<Self, VarIntError>

source

pub const unsafe fn new_unchecked(value: u64) -> Self

Returns a VarInt without validating the value is less than VarInt::MAX

§Safety

Callers need to ensure the value is less than or equal to VarInt::MAX

source

pub const fn from_u8(v: u8) -> Self

source

pub const fn from_u16(v: u16) -> Self

source

pub const fn from_u32(v: u32) -> Self

source

pub const fn as_u64(self) -> u64

source

pub fn checked_add(self, value: Self) -> Option<Self>

source

pub fn checked_add_usize(self, value: usize) -> Option<Self>

source

pub fn saturating_add(self, value: Self) -> Self

source

pub fn checked_sub(self, value: Self) -> Option<Self>

source

pub fn saturating_sub(self, value: Self) -> Self

source

pub fn checked_mul(self, value: Self) -> Option<Self>

source

pub fn saturating_mul(self, value: Self) -> Self

source

pub fn checked_div(self, value: Self) -> Option<Self>

source

pub fn encode_updated<E: Encoder>(self, replacement: Self, encoder: &mut E)

Re-encodes a replacement value where self was used as a placeholder.

Methods from Deref<Target = u64>§

1.43.0 · source

pub const MIN: u64 = 0u64

1.43.0 · source

pub const MAX: u64 = 18_446_744_073_709_551_615u64

1.53.0 · source

pub const BITS: u32 = 64u32

Trait Implementations§

source§

impl Add<usize> for VarInt

§

type Output = VarInt

The resulting type after applying the + operator.
source§

fn add(self, rhs: usize) -> Self

Performs the + operation. Read more
source§

impl Add for VarInt

§

type Output = VarInt

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self

Performs the + operation. Read more
source§

impl AddAssign<usize> for VarInt

source§

fn add_assign(&mut self, rhs: usize)

Performs the += operation. Read more
source§

impl AddAssign for VarInt

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl Arg for VarInt

source§

impl AsRef<u64> for VarInt

source§

fn as_ref(&self) -> &u64

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for VarInt

source§

fn clone(&self) -> VarInt

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VarInt

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> DecoderValue<'a> for VarInt

source§

fn decode(buffer: DecoderBuffer<'a>) -> DecoderBufferResult<'a, Self>

source§

impl<'a> DecoderValueMut<'a> for VarInt

source§

impl Default for VarInt

source§

fn default() -> VarInt

Returns the “default value” for a type. Read more
source§

impl Deref for VarInt

§

type Target = u64

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl Display for VarInt

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Div<usize> for VarInt

§

type Output = VarInt

The resulting type after applying the / operator.
source§

fn div(self, rhs: usize) -> Self

Performs the / operation. Read more
source§

impl Div for VarInt

§

type Output = VarInt

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self

Performs the / operation. Read more
source§

impl DivAssign<usize> for VarInt

source§

fn div_assign(&mut self, rhs: usize)

Performs the /= operation. Read more
source§

impl DivAssign for VarInt

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl EncoderValue for VarInt

source§

fn encode<E: Encoder>(&self, encoder: &mut E)

Encodes the value into the encoder
source§

fn encoding_size(&self) -> usize

Returns the encoding size with no buffer constrains
source§

fn encoding_size_for_encoder<E: Encoder>(&self, encoder: &E) -> usize

Returns the encoding size for the given encoder’s capacity
source§

fn encode_mut<E>(&mut self, encoder: &mut E)
where E: Encoder,

Encodes the value into the encoder, while potentially mutating the value itself
source§

fn encode_with_len_prefix<Len, E>(&self, encoder: &mut E)
where Len: TryFrom<usize> + EncoderValue, E: Encoder, Self: Sized, <Len as TryFrom<usize>>::Error: Debug,

Encodes the value into the encoder with a prefix of Len
source§

fn encode_to_vec(&self) -> Vec<u8>

source§

impl From<Error> for VarInt

source§

fn from(e: Error) -> Self

Converts to this type from the input type.
source§

impl From<StreamId> for VarInt

source§

fn from(id: StreamId) -> Self

Converts to this type from the input type.
source§

impl From<VarInt> for Error

source§

fn from(value: VarInt) -> Self

Converts to this type from the input type.
source§

impl From<VarInt> for u64

source§

fn from(v: VarInt) -> u64

Converts to this type from the input type.
source§

impl From<u16> for VarInt

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for VarInt

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl From<u8> for VarInt

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl Hash for VarInt

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl IntervalBound for VarInt

source§

fn step_up(self) -> Option<Self>

source§

fn step_down(self) -> Option<Self>

source§

fn steps_between(&self, upper: &Self) -> usize

source§

fn steps_between_len(&self, len: usize) -> Self

source§

fn step_up_saturating(self) -> Self

source§

fn step_down_saturating(self) -> Self

source§

impl IntoEvent<u64> for VarInt

source§

impl Mul<usize> for VarInt

§

type Output = VarInt

The resulting type after applying the * operator.
source§

fn mul(self, rhs: usize) -> Self

Performs the * operation. Read more
source§

impl Mul for VarInt

§

type Output = VarInt

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self

Performs the * operation. Read more
source§

impl MulAssign<usize> for VarInt

source§

fn mul_assign(&mut self, rhs: usize)

Performs the *= operation. Read more
source§

impl MulAssign for VarInt

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl Ord for VarInt

source§

fn cmp(&self, other: &VarInt) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<VarInt> for ActiveConnectionIdLimit

source§

fn eq(&self, value: &VarInt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<VarInt> for InitialMaxData

source§

fn eq(&self, value: &VarInt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<VarInt> for InitialMaxStreamDataBidiLocal

source§

fn eq(&self, value: &VarInt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<VarInt> for InitialMaxStreamDataBidiRemote

source§

fn eq(&self, value: &VarInt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<VarInt> for InitialMaxStreamDataUni

source§

fn eq(&self, value: &VarInt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<VarInt> for InitialMaxStreamsBidi

source§

fn eq(&self, value: &VarInt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<VarInt> for InitialMaxStreamsUni

source§

fn eq(&self, value: &VarInt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<VarInt> for MaxAckDelay

source§

fn eq(&self, value: &VarInt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<VarInt> for MaxDatagramFrameSize

source§

fn eq(&self, value: &VarInt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<VarInt> for MaxIdleTimeout

source§

fn eq(&self, value: &VarInt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<VarInt> for MaxUdpPayloadSize

source§

fn eq(&self, value: &VarInt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u64> for VarInt

source§

fn eq(&self, other: &u64) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<usize> for VarInt

source§

fn eq(&self, other: &usize) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for VarInt

source§

fn eq(&self, other: &VarInt) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<VarInt> for ActiveConnectionIdLimit

source§

fn partial_cmp(&self, value: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<VarInt> for InitialMaxData

source§

fn partial_cmp(&self, value: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<VarInt> for InitialMaxStreamDataBidiLocal

source§

fn partial_cmp(&self, value: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<VarInt> for InitialMaxStreamDataBidiRemote

source§

fn partial_cmp(&self, value: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<VarInt> for InitialMaxStreamDataUni

source§

fn partial_cmp(&self, value: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<VarInt> for InitialMaxStreamsBidi

source§

fn partial_cmp(&self, value: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<VarInt> for InitialMaxStreamsUni

source§

fn partial_cmp(&self, value: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<VarInt> for MaxAckDelay

source§

fn partial_cmp(&self, value: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<VarInt> for MaxDatagramFrameSize

source§

fn partial_cmp(&self, value: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<VarInt> for MaxIdleTimeout

source§

fn partial_cmp(&self, value: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<VarInt> for MaxUdpPayloadSize

source§

fn partial_cmp(&self, value: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<u64> for VarInt

source§

fn partial_cmp(&self, other: &u64) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd<usize> for VarInt

source§

fn partial_cmp(&self, other: &usize) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl PartialOrd for VarInt

source§

fn partial_cmp(&self, other: &VarInt) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Rem<usize> for VarInt

§

type Output = VarInt

The resulting type after applying the % operator.
source§

fn rem(self, rhs: usize) -> Self

Performs the % operation. Read more
source§

impl Rem for VarInt

§

type Output = VarInt

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Self) -> Self

Performs the % operation. Read more
source§

impl RemAssign<usize> for VarInt

source§

fn rem_assign(&mut self, rhs: usize)

Performs the %= operation. Read more
source§

impl RemAssign for VarInt

source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
source§

impl Sub<usize> for VarInt

§

type Output = VarInt

The resulting type after applying the - operator.
source§

fn sub(self, rhs: usize) -> Self

Performs the - operation. Read more
source§

impl Sub for VarInt

§

type Output = VarInt

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self

Performs the - operation. Read more
source§

impl SubAssign<usize> for VarInt

source§

fn sub_assign(&mut self, rhs: usize)

Performs the -= operation. Read more
source§

impl SubAssign for VarInt

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl TryFrom<VarInt> for ActiveConnectionIdLimit

§

type Error = ValidationError

The type returned in the event of a conversion error.
source§

fn try_from(value: VarInt) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<VarInt> for InitialMaxData

§

type Error = ValidationError

The type returned in the event of a conversion error.
source§

fn try_from(value: VarInt) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<VarInt> for InitialMaxStreamDataBidiLocal

§

type Error = ValidationError

The type returned in the event of a conversion error.
source§

fn try_from(value: VarInt) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<VarInt> for InitialMaxStreamDataBidiRemote

§

type Error = ValidationError

The type returned in the event of a conversion error.
source§

fn try_from(value: VarInt) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<VarInt> for InitialMaxStreamDataUni

§

type Error = ValidationError

The type returned in the event of a conversion error.
source§

fn try_from(value: VarInt) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<VarInt> for InitialMaxStreamsBidi

§

type Error = ValidationError

The type returned in the event of a conversion error.
source§

fn try_from(value: VarInt) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<VarInt> for InitialMaxStreamsUni

§

type Error = ValidationError

The type returned in the event of a conversion error.
source§

fn try_from(value: VarInt) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<VarInt> for MaxAckDelay

§

type Error = ValidationError

The type returned in the event of a conversion error.
source§

fn try_from(value: VarInt) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<VarInt> for MaxDatagramFrameSize

§

type Error = ValidationError

The type returned in the event of a conversion error.
source§

fn try_from(value: VarInt) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<VarInt> for MaxIdleTimeout

§

type Error = ValidationError

The type returned in the event of a conversion error.
source§

fn try_from(value: VarInt) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<VarInt> for MaxUdpPayloadSize

§

type Error = ValidationError

The type returned in the event of a conversion error.
source§

fn try_from(value: VarInt) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<u128> for VarInt

§

type Error = VarIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u128) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<u64> for VarInt

§

type Error = VarIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<usize> for VarInt

§

type Error = VarIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryInto<u16> for VarInt

§

type Error = <u16 as TryFrom<u64>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<u16, Self::Error>

Performs the conversion.
source§

impl TryInto<u32> for VarInt

§

type Error = <u32 as TryFrom<u64>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<u32, Self::Error>

Performs the conversion.
source§

impl TryInto<u8> for VarInt

§

type Error = <u8 as TryFrom<u64>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<u8, Self::Error>

Performs the conversion.
source§

impl TryInto<usize> for VarInt

§

type Error = <usize as TryFrom<u64>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<usize, Self::Error>

Performs the conversion.
source§

impl Copy for VarInt

source§

impl Eq for VarInt

source§

impl StructuralPartialEq for VarInt

Auto Trait Implementations§

§

impl Freeze for VarInt

§

impl RefUnwindSafe for VarInt

§

impl Send for VarInt

§

impl Sync for VarInt

§

impl Unpin for VarInt

§

impl UnwindSafe for VarInt

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> PacketPayloadEncoder for T
where T: EncoderValue,

source§

fn encoding_size_hint<E>(&mut self, encoder: &E, minimum_len: usize) -> usize
where E: Encoder,

Returns an estimate of the encoding size of the payload. This may be inaccurate from what actually is encoded. Estimates should be less than or equal to what is actually written. Implementations can return 0 to skip encoding.
source§

fn encode( &mut self, buffer: &mut Buffer<'_>, _minimum_len: usize, _header_len: usize, _tag_len: usize )

Encodes the payload into the buffer. Implementations should ensure the encoding len is at least the minimum_len, otherwise the packet writing will panic.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, U> Upcast<T> for U
where T: UpcastFrom<U>,

source§

fn upcast(self) -> T

source§

impl<T, B> UpcastFrom<Counter<T, B>> for T

source§

fn upcast_from(value: Counter<T, B>) -> T

source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,