pub struct ResourceLedger { /* private fields */ }Implementations§
Source§impl ResourceLedger
impl ResourceLedger
pub fn new(capacity: ResourceCapacity) -> Self
pub fn capacity(&self) -> &ResourceCapacity
pub fn ensure_within_capacity( &self, reservation: &TaskResourceReservation, ) -> AppResult<()>
pub fn can_reserve( &self, currently_reserved: &ResourceCapacity, reservation: &TaskResourceReservation, ) -> bool
pub fn reserved_capacity<'a, I>(&self, reservations: I) -> ResourceCapacitywhere
I: IntoIterator<Item = &'a TaskResourceReservation>,
pub fn available_capacity( &self, reserved: &ResourceCapacity, ) -> ResourceCapacity
pub fn empty_snapshot(&self, runtime_id: String) -> RuntimeResourcesResponse
Trait Implementations§
Source§impl Clone for ResourceLedger
impl Clone for ResourceLedger
Source§fn clone(&self) -> ResourceLedger
fn clone(&self) -> ResourceLedger
Returns a duplicate of the value. Read more
1.0.0 · 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 ResourceLedger
impl RefUnwindSafe for ResourceLedger
impl Send for ResourceLedger
impl Sync for ResourceLedger
impl Unpin for ResourceLedger
impl UnsafeUnpin for ResourceLedger
impl UnwindSafe for ResourceLedger
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