pub struct ManagedResourceScope { /* private fields */ }Expand description
A Module-generation resource scope backed by Driver-polled cleanup futures.
Implementations§
Source§impl ManagedResourceScope
impl ManagedResourceScope
Sourcepub fn register(
&self,
resource: impl ManagedResource,
) -> Result<ManagedResourceHandle, ResourceRegistrationError>
pub fn register( &self, resource: impl ManagedResource, ) -> Result<ManagedResourceHandle, ResourceRegistrationError>
Registers a resource owned by this Module Instance generation.
Sourcepub fn resource_count(&self) -> usize
pub fn resource_count(&self) -> usize
Returns the number of resources that still need cleanup.
Trait Implementations§
Source§impl Clone for ManagedResourceScope
impl Clone for ManagedResourceScope
Source§fn clone(&self) -> ManagedResourceScope
fn clone(&self) -> ManagedResourceScope
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 !RefUnwindSafe for ManagedResourceScope
impl !Send for ManagedResourceScope
impl !Sync for ManagedResourceScope
impl !UnwindSafe for ManagedResourceScope
impl Freeze for ManagedResourceScope
impl Unpin for ManagedResourceScope
impl UnsafeUnpin for ManagedResourceScope
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