pub struct TextureHandle(/* private fields */);Expand description
Handle to a Texture.
Implementations§
Source§impl TextureHandle
impl TextureHandle
pub fn is_null(self) -> bool
Sourcepub fn raw_parts(self) -> (u32, u16)
pub fn raw_parts(self) -> (u32, u16)
Returns the raw (slot, generation) representation used by the owning pool.
This is intended for trusted serialization code that needs to persist handle identity without introducing a separate forward-map layer.
Sourcepub unsafe fn from_raw_parts_unchecked(index: u32, generation: u16) -> Self
pub unsafe fn from_raw_parts_unchecked(index: u32, generation: u16) -> Self
Reconstructs a handle from trusted raw (slot, generation) parts.
Normal callers should not create handles directly; obtain them from the owning resource pool instead.
§Safety
index and generation must come from a compatible serialized handle identity for
the same resource pool domain. Constructing arbitrary values is not memory-unsafe,
but it can create stale or invalid handles that fail pool validity checks or point
at the wrong logical resource.
Trait Implementations§
Source§impl Clone for TextureHandle
impl Clone for TextureHandle
Source§fn clone(&self) -> TextureHandle
fn clone(&self) -> TextureHandle
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 moreSource§impl Debug for TextureHandle
impl Debug for TextureHandle
Source§impl Default for TextureHandle
impl Default for TextureHandle
Source§fn default() -> TextureHandle
fn default() -> TextureHandle
Returns the “default value” for a type. Read more
Source§impl Display for TextureHandle
impl Display for TextureHandle
Source§impl Hash for TextureHandle
impl Hash for TextureHandle
Source§impl Ord for TextureHandle
impl Ord for TextureHandle
Source§fn cmp(&self, other: &TextureHandle) -> Ordering
fn cmp(&self, other: &TextureHandle) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TextureHandle
impl PartialEq for TextureHandle
Source§impl PartialOrd for TextureHandle
impl PartialOrd for TextureHandle
impl Copy for TextureHandle
impl Eq for TextureHandle
impl StructuralPartialEq for TextureHandle
Auto Trait Implementations§
impl Freeze for TextureHandle
impl RefUnwindSafe for TextureHandle
impl Send for TextureHandle
impl Sync for TextureHandle
impl Unpin for TextureHandle
impl UnsafeUnpin for TextureHandle
impl UnwindSafe for TextureHandle
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