pub struct ReservationLedger { /* private fields */ }Implementations§
Source§impl ReservationLedger
impl ReservationLedger
pub fn new(capacity: ResourceContract) -> Self
pub fn available(&self) -> ResourceContract
pub fn reserve( &mut self, requested: &ResourceContract, policy: &ResourceContract, ) -> Result<ResourceContract, ResourceError>
pub fn release( &mut self, contract: &ResourceContract, ) -> Result<(), ResourceError>
Trait Implementations§
Source§impl Clone for ReservationLedger
impl Clone for ReservationLedger
Source§fn clone(&self) -> ReservationLedger
fn clone(&self) -> ReservationLedger
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReservationLedger
impl RefUnwindSafe for ReservationLedger
impl Send for ReservationLedger
impl Sync for ReservationLedger
impl Unpin for ReservationLedger
impl UnsafeUnpin for ReservationLedger
impl UnwindSafe for ReservationLedger
Blanket Implementations§
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