pub struct CreditTable { /* private fields */ }Implementations§
Source§impl CreditTable
impl CreditTable
Sourcepub fn open_stream(
&mut self,
dir: u8,
leases: &mut LeaseTable,
ledger: &mut ReservationLedger,
bytes: u32,
) -> Result<BufferLease, QdnfError>
pub fn open_stream( &mut self, dir: u8, leases: &mut LeaseTable, ledger: &mut ReservationLedger, bytes: u32, ) -> Result<BufferLease, QdnfError>
Grant one stream in dir. Ledger + first-open lease are all-or-nothing
(failed lease acquire releases the ledger charge), matching cell admit.
The returned BufferLease is the direction-aggregate backing handle.
close_stream releases the physical lease only when that direction’s
last stream closes.
Sourcepub fn close_stream(
&mut self,
dir: u8,
leases: &mut LeaseTable,
ledger: &mut ReservationLedger,
lease: BufferLease,
bytes: u32,
) -> Result<(), QdnfError>
pub fn close_stream( &mut self, dir: u8, leases: &mut LeaseTable, ledger: &mut ReservationLedger, lease: BufferLease, bytes: u32, ) -> Result<(), QdnfError>
Closes stream.
Sourcepub fn remaining(&self, dir: u8) -> Result<u32, QdnfError>
pub fn remaining(&self, dir: u8) -> Result<u32, QdnfError>
Remaining application window for dir. Not a congestion window.
Auto Trait Implementations§
impl Freeze for CreditTable
impl RefUnwindSafe for CreditTable
impl Send for CreditTable
impl Sync for CreditTable
impl Unpin for CreditTable
impl UnsafeUnpin for CreditTable
impl UnwindSafe for CreditTable
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