pub struct CompositeGrant { /* private fields */ }Expand description
A collection of memory grants that can be managed together.
Implementations§
Source§impl CompositeGrant
impl CompositeGrant
Sourcepub fn add(&mut self, grant: MemoryGrant)
pub fn add(&mut self, grant: MemoryGrant)
Adds a grant to the collection.
Sourcepub fn total_size(&self) -> usize
pub fn total_size(&self) -> usize
Returns the total size of all grants.
Sourcepub fn consume_all(self) -> usize
pub fn consume_all(self) -> usize
Consumes all grants and returns the total size.
Trait Implementations§
Source§impl Default for CompositeGrant
impl Default for CompositeGrant
Source§fn default() -> CompositeGrant
fn default() -> CompositeGrant
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompositeGrant
impl !RefUnwindSafe for CompositeGrant
impl Send for CompositeGrant
impl Sync for CompositeGrant
impl Unpin for CompositeGrant
impl !UnwindSafe for CompositeGrant
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