pub struct DgramFlowId(/* private fields */);Expand description
A validated RFC 9297 Quarter Stream ID or legacy datagram-flow-id.
The inner value is guaranteed not to exceed MAX_QUARTER_STREAM_ID.
Note, that legacy flow_ids have a max value of 10^15-1, which is less
than the value of MAX_QUARTER_STREAM_ID. This struct only checks
against MAX_QUARTER_STREAM_ID.
Implementations§
Source§impl DgramFlowId
impl DgramFlowId
Sourcepub fn new(id: u64) -> Option<Self>
pub fn new(id: u64) -> Option<Self>
Creates a new DgramFlowId.
Returns None when id exceeds MAX_QUARTER_STREAM_ID.
Trait Implementations§
Source§impl Clone for DgramFlowId
impl Clone for DgramFlowId
impl Copy for DgramFlowId
Source§impl Debug for DgramFlowId
impl Debug for DgramFlowId
Source§impl Display for DgramFlowId
impl Display for DgramFlowId
impl Eq for DgramFlowId
Source§impl Hash for DgramFlowId
impl Hash for DgramFlowId
Source§impl Ord for DgramFlowId
impl Ord for DgramFlowId
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for DgramFlowId
impl PartialEq for DgramFlowId
Source§impl PartialOrd for DgramFlowId
impl PartialOrd for DgramFlowId
impl StructuralPartialEq for DgramFlowId
Auto Trait Implementations§
impl Forget for DgramFlowId
impl Freeze for DgramFlowId
impl Move for DgramFlowId
impl RefUnwindSafe for DgramFlowId
impl Send for DgramFlowId
impl Sync for DgramFlowId
impl Unpin for DgramFlowId
impl UnsafeUnpin for DgramFlowId
impl UnwindSafe for DgramFlowId
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.§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
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.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