pub struct CellTable { /* private fields */ }Expand description
Sixteen occupancy flags plus owner-held reservation handles (E10.1).
Implementations§
Source§impl CellTable
impl CellTable
Sourcepub fn reserve(
&mut self,
leases: &mut LeaseTable,
ledger: &mut ReservationLedger,
profile: CellProfile,
bytes: u64,
) -> Result<CellSlot, QdnfError>
pub fn reserve( &mut self, leases: &mut LeaseTable, ledger: &mut ReservationLedger, profile: CellProfile, bytes: u64, ) -> Result<CellSlot, QdnfError>
Reserve before construction. Ordinary cells cannot exceed 512 MiB.
Ledger charge uses ReservationLedger::reserve / ReservationLedger::release
with a ResourceBudget of bytes (work/io = 0) and verified_peer = true.
Lease acquire is all-or-nothing: a failed LeaseTable::acquire releases the ledger charge.
Sourcepub fn release(
&mut self,
leases: &mut LeaseTable,
ledger: &mut ReservationLedger,
slot: CellSlot,
) -> Result<(), QdnfError>
pub fn release( &mut self, leases: &mut LeaseTable, ledger: &mut ReservationLedger, slot: CellSlot, ) -> Result<(), QdnfError>
Releases the resource.
Sourcepub fn release_strict(
&mut self,
leases: &mut LeaseTable,
ledger: &mut ReservationLedger,
slot: CellSlot,
) -> Result<(), QdnfError>
pub fn release_strict( &mut self, leases: &mut LeaseTable, ledger: &mut ReservationLedger, slot: CellSlot, ) -> Result<(), QdnfError>
Strict release (R10 / R11): rejects any release call whose caller-supplied
slot.bytes does not match the authoritative recorded reservation or whose
(lease_id, generation) handle is stale.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CellTable
impl RefUnwindSafe for CellTable
impl Send for CellTable
impl Sync for CellTable
impl Unpin for CellTable
impl UnsafeUnpin for CellTable
impl UnwindSafe for CellTable
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.