pub struct TransientResource {
pub handle: ResourceHandle,
pub descriptor: ResourceDescriptor,
}Expand description
A transient resource that is created at first use and destroyed after last
use within a single frame. This is a convenience wrapper; the actual
lifetime management is performed by ResourcePool.
Fields§
§handle: ResourceHandle§descriptor: ResourceDescriptorImplementations§
Source§impl TransientResource
impl TransientResource
pub fn new(handle: ResourceHandle, descriptor: ResourceDescriptor) -> Self
pub fn name(&self) -> &str
pub fn format(&self) -> TextureFormat
pub fn estimated_bytes(&self, bb_w: u32, bb_h: u32) -> u64
Trait Implementations§
Source§impl Clone for TransientResource
impl Clone for TransientResource
Source§fn clone(&self) -> TransientResource
fn clone(&self) -> TransientResource
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 TransientResource
impl RefUnwindSafe for TransientResource
impl Send for TransientResource
impl Sync for TransientResource
impl Unpin for TransientResource
impl UnsafeUnpin for TransientResource
impl UnwindSafe for TransientResource
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