Struct wtransport::SessionId
source · pub struct SessionId(/* private fields */);
Expand description
A WebTransport session id.
Internally, it corresponds to a bidirectional client-initiated QUIC stream, that is, a webtransport session stream.
Implementations§
source§impl SessionId
impl SessionId
sourcepub const fn into_varint(self) -> VarInt
pub const fn into_varint(self) -> VarInt
Returns the session id as VarInt
value.
sourcepub const fn session_stream(self) -> StreamId
pub const fn session_stream(self) -> StreamId
Returns the corresponding session QUIC stream.
sourcepub fn try_from_session_stream(
stream_id: StreamId
) -> Result<SessionId, InvalidSessionId>
pub fn try_from_session_stream( stream_id: StreamId ) -> Result<SessionId, InvalidSessionId>
Tries to create a session id from its session stream.
stream_id
must be bidirectional and client-initiated, otherwise
an Err
is returned.
sourcepub const unsafe fn from_session_stream_unchecked(
stream_id: StreamId
) -> SessionId
pub const unsafe fn from_session_stream_unchecked( stream_id: StreamId ) -> SessionId
Creates a session id without checking session stream properties.
§Safety
stream_id
must be bidirectional and client-initiated.
Trait Implementations§
source§impl Ord for SessionId
impl Ord for SessionId
source§impl PartialEq for SessionId
impl PartialEq for SessionId
source§impl PartialOrd for SessionId
impl PartialOrd for SessionId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moreimpl Copy for SessionId
impl Eq for SessionId
impl StructuralPartialEq for SessionId
Auto Trait Implementations§
impl Freeze for SessionId
impl RefUnwindSafe for SessionId
impl Send for SessionId
impl Sync for SessionId
impl Unpin for SessionId
impl UnwindSafe for SessionId
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<S> IntoConnectOptions for Swhere
S: ToString,
impl<S> IntoConnectOptions for Swhere
S: ToString,
source§fn into_options(self) -> ConnectOptions
fn into_options(self) -> ConnectOptions
Perform value-to-value conversion into
ConnectOptions
.