struct ResourceIdentityFactory<T> {
next_id: AtomicU64,
_phantom: PhantomData<T>,
}
Available on
vulkan
only.Expand description
Generates unique IDs for each resource of type T
.
Because vk handles are not permanently unique, this provides a way to generate unique IDs for each resource.
Fields§
§next_id: AtomicU64
Available on
§target_has_atomic="64"
only._phantom: PhantomData<T>
Implementations§
Source§impl<T> ResourceIdentityFactory<T>
impl<T> ResourceIdentityFactory<T>
fn new() -> Self
Sourcefn next(&self) -> ResourceIdentity<T>
fn next(&self) -> ResourceIdentity<T>
Returns a new unique ID for a resource of type T
.
Auto Trait Implementations§
impl<T> !Freeze for ResourceIdentityFactory<T>
impl<T> RefUnwindSafe for ResourceIdentityFactory<T>where
T: RefUnwindSafe,
impl<T> Send for ResourceIdentityFactory<T>where
T: Send,
impl<T> Sync for ResourceIdentityFactory<T>where
T: Sync,
impl<T> Unpin for ResourceIdentityFactory<T>where
T: Unpin,
impl<T> UnwindSafe for ResourceIdentityFactory<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