pub struct Lease<T> { /* private fields */ }
Expand description
Holds a leased resource and implements Drop
in order to return the resource.
This simple wrapper type implements only the AsRef
, AsMut
, Deref
and DerefMut
traits
and provides no other functionality. A freshly leased resource is guaranteed to have no other
owners and may be mutably accessed.
Trait Implementations§
source§impl Bind<&mut RenderGraph, AccelerationStructureLeaseNode> for Lease<AccelerationStructure>
impl Bind<&mut RenderGraph, AccelerationStructureLeaseNode> for Lease<AccelerationStructure>
source§fn bind(self, graph: &mut RenderGraph) -> AccelerationStructureLeaseNode
fn bind(self, graph: &mut RenderGraph) -> AccelerationStructureLeaseNode
Binds the resource to a graph-like object. Read more
source§impl Bind<&mut RenderGraph, BufferLeaseNode> for Lease<Buffer>
impl Bind<&mut RenderGraph, BufferLeaseNode> for Lease<Buffer>
source§fn bind(self, graph: &mut RenderGraph) -> BufferLeaseNode
fn bind(self, graph: &mut RenderGraph) -> BufferLeaseNode
Binds the resource to a graph-like object. Read more
source§impl Bind<&mut RenderGraph, ImageLeaseNode> for Lease<Image>
impl Bind<&mut RenderGraph, ImageLeaseNode> for Lease<Image>
source§fn bind(self, graph: &mut RenderGraph) -> ImageLeaseNode
fn bind(self, graph: &mut RenderGraph) -> ImageLeaseNode
Binds the resource to a graph-like object. Read more
Auto Trait Implementations§
impl<T> RefUnwindSafe for Lease<T>where
T: RefUnwindSafe,
impl<T> Send for Lease<T>where
T: Send,
impl<T> Sync for Lease<T>
impl<T> Unpin for Lease<T>where
T: Unpin,
impl<T> UnwindSafe for Lease<T>where
T: UnwindSafe,
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