pub struct SessionTable { /* private fields */ }Implementations§
Source§impl SessionTable
impl SessionTable
Sourcepub fn live_count(&self) -> usize
pub fn live_count(&self) -> usize
Live sessions.
Sourcepub fn first_live(&self) -> Option<SessionHandle>
pub fn first_live(&self) -> Option<SessionHandle>
SessionTable::first_live.
Sourcepub fn insert(
&mut self,
binding: SessionBinding,
protection: ProtectedAckSession,
reservation: ReservationHandle,
) -> Result<SessionHandle, QdnfError>
pub fn insert( &mut self, binding: SessionBinding, protection: ProtectedAckSession, reservation: ReservationHandle, ) -> Result<SessionHandle, QdnfError>
Occupies one vacancy. Caller must Self::is_full before reserving so a
rejected insert cannot drop an unreleased handle.
Sourcepub fn get_mut(
&mut self,
h: SessionHandle,
) -> Result<&mut ProtectedAckSession, QdnfError>
pub fn get_mut( &mut self, h: SessionHandle, ) -> Result<&mut ProtectedAckSession, QdnfError>
Mutable session for h; error on stale handle.
Sourcepub fn binding(&self, h: SessionHandle) -> Result<SessionBinding, QdnfError>
pub fn binding(&self, h: SessionHandle) -> Result<SessionBinding, QdnfError>
Session binding for h.
Sourcepub fn commit_send_offset(
&mut self,
h: SessionHandle,
payload_len: u16,
) -> Result<u64, QdnfError>
pub fn commit_send_offset( &mut self, h: SessionHandle, payload_len: u16, ) -> Result<u64, QdnfError>
Advance the application send offset only after the bearer accepted the frame.
Sourcepub fn send_offset(&self, h: SessionHandle) -> Result<u64, QdnfError>
pub fn send_offset(&self, h: SessionHandle) -> Result<u64, QdnfError>
Current send offset for h.
Sourcepub fn close(
&mut self,
h: SessionHandle,
ledger: &mut ReservationLedger,
) -> Result<(), QdnfError>
pub fn close( &mut self, h: SessionHandle, ledger: &mut ReservationLedger, ) -> Result<(), QdnfError>
Handle-based release. Does not accept caller-supplied byte amounts.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionTable
impl RefUnwindSafe for SessionTable
impl Send for SessionTable
impl Sync for SessionTable
impl Unpin for SessionTable
impl UnsafeUnpin for SessionTable
impl UnwindSafe for SessionTable
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.