pub struct ResourceKey(/* private fields */);Expand description
Identity of one streamed resource: a Category and the engine’s dense
index inside it (region number, texture page number, archetype number).
Packed into one u32 so a lookup is one integer compare.
Implementations§
Source§impl ResourceKey
impl ResourceKey
Sourcepub const fn new(category: Category, index: u32) -> Option<ResourceKey>
pub const fn new(category: Category, index: u32) -> Option<ResourceKey>
A key for index inside category. None when index exceeds
ResourceKey::MAX_INDEX.
Sourcepub const fn from_u32(packed: u32) -> Option<ResourceKey>
pub const fn from_u32(packed: u32) -> Option<ResourceKey>
Rebuild a key from ResourceKey::as_u32. None when the category
bits are out of range.
Trait Implementations§
Source§impl Clone for ResourceKey
impl Clone for ResourceKey
Source§fn clone(&self) -> ResourceKey
fn clone(&self) -> ResourceKey
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceKey
impl Debug for ResourceKey
Source§impl Hash for ResourceKey
impl Hash for ResourceKey
Source§impl Ord for ResourceKey
impl Ord for ResourceKey
Source§impl PartialEq for ResourceKey
impl PartialEq for ResourceKey
Source§impl PartialOrd for ResourceKey
impl PartialOrd for ResourceKey
Source§fn partial_cmp(&self, other: &ResourceKey) -> Option<Ordering>
fn partial_cmp(&self, other: &ResourceKey) -> Option<Ordering>
impl Copy for ResourceKey
impl Eq for ResourceKey
impl StructuralPartialEq for ResourceKey
Auto Trait Implementations§
impl Freeze for ResourceKey
impl RefUnwindSafe for ResourceKey
impl Send for ResourceKey
impl Sync for ResourceKey
impl Unpin for ResourceKey
impl UnsafeUnpin for ResourceKey
impl UnwindSafe for ResourceKey
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)