pub struct LeaseTable { /* private fields */ }Implementations§
Source§impl LeaseTable
impl LeaseTable
Sourcepub const fn new() -> LeaseTable
pub const fn new() -> LeaseTable
Creates a default LeaseTable.
Sourcepub fn acquire(
&mut self,
capacity: u32,
exclusive: bool,
) -> Result<BufferLease, QdnfError>
pub fn acquire( &mut self, capacity: u32, exclusive: bool, ) -> Result<BufferLease, QdnfError>
Acquires the resource.
Sourcepub fn try_acquire_slot(
&mut self,
slot: usize,
capacity: u32,
exclusive: bool,
) -> Result<BufferLease, QdnfError>
pub fn try_acquire_slot( &mut self, slot: usize, capacity: u32, exclusive: bool, ) -> Result<BufferLease, QdnfError>
Acquire a specific free slot. Generation u64::MAX fails closed; it never wraps.
Sourcepub fn occupied_count(&self) -> usize
pub fn occupied_count(&self) -> usize
occupied count.
Trait Implementations§
Source§impl Default for LeaseTable
impl Default for LeaseTable
Source§fn default() -> LeaseTable
fn default() -> LeaseTable
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LeaseTable
impl RefUnwindSafe for LeaseTable
impl Send for LeaseTable
impl Sync for LeaseTable
impl Unpin for LeaseTable
impl UnsafeUnpin for LeaseTable
impl UnwindSafe for LeaseTable
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.