Struct StreamId

struct StreamId(_)

A stream identifier, as described in Section 5.1.1 of RFC 7540.

Streams are identified with an unsigned 31-bit integer. Streams initiated by a client MUST use odd-numbered stream identifiers; those initiated by the server MUST use even-numbered stream identifiers. A stream identifier of zero (0x0) is used for connection control messages; the stream identifier of zero cannot be used to establish a new stream.

Implementations

impl StreamId

fn as_u32(self: &Self) -> u32

Returns the u32 corresponding to this StreamId

Note

This is the same as the From<StreamId> implementation, but included as an inherent method because that implementation doesn't appear in rustdocs, as well as a way to force the type instead of relying on inference.

impl Clone for StreamId

fn clone(self: &Self) -> StreamId

impl Copy for StreamId

impl Debug for StreamId

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

impl Eq for StreamId

impl Freeze for StreamId

impl Hash for StreamId

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

impl PartialEq for StreamId

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

impl RefUnwindSafe for StreamId

impl Send for StreamId

impl StructuralPartialEq for StreamId

impl Sync for StreamId

impl Unpin for StreamId

impl UnsafeUnpin for StreamId

impl UnwindSafe for StreamId

impl<Q, K> Equivalent for StreamId

fn equivalent(self: &Self, key: &K) -> bool

impl<Q, K> Equivalent for StreamId

fn equivalent(self: &Self, key: &K) -> bool

impl<T> Any for StreamId

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for StreamId

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for StreamId

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

impl<T> CloneToUninit for StreamId

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for StreamId

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for StreamId

impl<T> ToOwned for StreamId

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> WithSubscriber for StreamId

impl<T, U> Into for StreamId

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for StreamId

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

impl<T, U> TryInto for StreamId

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