pub struct VirtualResource { /* private fields */ }Expand description
Represents a virtual resource in the system, uniquely identified by a string.
Note that the resource named swapchain is assumed to always be the swapchain resource for presenting.
Implementations§
Source§impl VirtualResource
impl VirtualResource
Sourcepub fn upgrade(&self) -> Self
pub fn upgrade(&self) -> Self
‘Upgrades’ the resource to a new version of itself. This is used to obtain the virtual resource name of an input resource after a task completes.
Sourcepub fn version(&self) -> usize
pub fn version(&self) -> usize
Returns the version of a resource, the larger this the more recent the version of the resource is.
Sourcepub fn is_source(&self) -> bool
pub fn is_source(&self) -> bool
Returns true if the resource is a source resource, e.g. an instance that does not depend on a previous pass.
Sourcepub fn is_associated_with(&self, rhs: &VirtualResource) -> bool
pub fn is_associated_with(&self, rhs: &VirtualResource) -> bool
Check if these virtual resources refer to the same physical resource
Sourcepub fn is_older(lhs: &VirtualResource, rhs: &VirtualResource) -> bool
pub fn is_older(lhs: &VirtualResource, rhs: &VirtualResource) -> bool
One virtual resource is older than another if it has less ‘+’ symbols.
Sourcepub fn is_younger(lhs: &VirtualResource, rhs: &VirtualResource) -> bool
pub fn is_younger(lhs: &VirtualResource, rhs: &VirtualResource) -> bool
Note that this is not the same as inverting the result of as_older(), for the same exact state of the resource, both of these functions should return false (they decide whether resources are strictly older or younger than each other).
Sourcepub fn resource_type(&self) -> ResourceType
pub fn resource_type(&self) -> ResourceType
Get the resource type of this virtual resource
Trait Implementations§
Source§impl Clone for VirtualResource
impl Clone for VirtualResource
Source§fn clone(&self) -> VirtualResource
fn clone(&self) -> VirtualResource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VirtualResource
impl Debug for VirtualResource
Source§impl Default for VirtualResource
impl Default for VirtualResource
Source§fn default() -> VirtualResource
fn default() -> VirtualResource
Source§impl Display for VirtualResource
impl Display for VirtualResource
Source§impl Hash for VirtualResource
impl Hash for VirtualResource
Source§impl PartialEq for VirtualResource
impl PartialEq for VirtualResource
impl Eq for VirtualResource
impl StructuralPartialEq for VirtualResource
Auto Trait Implementations§
impl Freeze for VirtualResource
impl RefUnwindSafe for VirtualResource
impl Send for VirtualResource
impl Sync for VirtualResource
impl Unpin for VirtualResource
impl UnwindSafe for VirtualResource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.