pub struct ResourceKey<T = ()> { /* private fields */ }Expand description
Typed identifier for a resource entry.
Implementations§
Source§impl<T> ResourceKey<T>
impl<T> ResourceKey<T>
pub const fn new(index: usize) -> ResourceKey<T>
pub const fn index(&self) -> usize
Sourcepub fn typed<U>(self) -> ResourceKey<U>
pub fn typed<U>(self) -> ResourceKey<U>
Reinterpret this key as pointing to a concrete resource type.
Trait Implementations§
Source§impl<T> Clone for ResourceKey<T>where
T: Clone,
impl<T> Clone for ResourceKey<T>where
T: Clone,
Source§fn clone(&self) -> ResourceKey<T>
fn clone(&self) -> ResourceKey<T>
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<T> Debug for ResourceKey<T>
impl<T> Debug for ResourceKey<T>
Source§impl<T> PartialEq for ResourceKey<T>where
T: PartialEq,
impl<T> PartialEq for ResourceKey<T>where
T: PartialEq,
impl<T> Copy for ResourceKey<T>where
T: Copy,
impl<T> Eq for ResourceKey<T>where
T: Eq,
impl<T> StructuralPartialEq for ResourceKey<T>
Auto Trait Implementations§
impl<T> Freeze for ResourceKey<T>
impl<T> RefUnwindSafe for ResourceKey<T>
impl<T> Send for ResourceKey<T>
impl<T> Sync for ResourceKey<T>
impl<T> Unpin for ResourceKey<T>
impl<T> UnwindSafe for ResourceKey<T>
Blanket Implementations§
§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)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more