pub struct ReservationTracker { /* private fields */ }Expand description
Bounded reservation tracker: conservation, ownership, generation, peak bytes.
Implementations§
Source§impl ReservationTracker
impl ReservationTracker
Sourcepub const fn live_bytes(&self) -> u64
pub const fn live_bytes(&self) -> u64
ReservationTracker::live_bytes.
Sourcepub const fn peak_bytes(&self) -> u64
pub const fn peak_bytes(&self) -> u64
ReservationTracker::peak_bytes.
Sourcepub const fn live_leases(&self) -> u8
pub const fn live_leases(&self) -> u8
ReservationTracker::live_leases.
Sourcepub fn live_generation(&self, slot: u8) -> Result<Generation, QdnfError>
pub fn live_generation(&self, slot: u8) -> Result<Generation, QdnfError>
Live allocation generation.
Sourcepub fn reserve(
&mut self,
owner: u8,
bytes: u32,
) -> Result<HarnessLease, QdnfError>
pub fn reserve( &mut self, owner: u8, bytes: u32, ) -> Result<HarnessLease, QdnfError>
Reserves capacity.
Sourcepub fn occupied_bytes(&self) -> u64
pub fn occupied_bytes(&self) -> u64
Occupied-slot sum. Must equal live_bytes after every mutating call.
Auto Trait Implementations§
impl Freeze for ReservationTracker
impl RefUnwindSafe for ReservationTracker
impl Send for ReservationTracker
impl Sync for ReservationTracker
impl Unpin for ReservationTracker
impl UnsafeUnpin for ReservationTracker
impl UnwindSafe for ReservationTracker
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