pub struct ResourceIndex(/* private fields */);
Expand description
Index pointing to a resource within a component.
This index space covers all unique resource type definitions. For
example all unique imports come first and then all locally-defined
resources come next. Note that this does not count the number of runtime
tables required to track resources (that’s TypeResourceTableIndex
instead). Instead this is a count of the number of unique
(type (resource (rep ..)))
declarations within a component, plus
imports.
This is then used for correlating various information such as destructors, origin information, etc.
Implementations§
Source§impl ResourceIndex
impl ResourceIndex
Trait Implementations§
Source§impl Clone for ResourceIndex
impl Clone for ResourceIndex
Source§fn clone(&self) -> ResourceIndex
fn clone(&self) -> ResourceIndex
Returns a copy 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 ResourceIndex
impl Debug for ResourceIndex
Source§impl<'de> Deserialize<'de> for ResourceIndex
impl<'de> Deserialize<'de> for ResourceIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EntityRef for ResourceIndex
impl EntityRef for ResourceIndex
Source§impl Hash for ResourceIndex
impl Hash for ResourceIndex
Source§impl Ord for ResourceIndex
impl Ord for ResourceIndex
Source§fn cmp(&self, other: &ResourceIndex) -> Ordering
fn cmp(&self, other: &ResourceIndex) -> 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 ResourceIndex
impl PartialEq for ResourceIndex
Source§impl PartialOrd for ResourceIndex
impl PartialOrd for ResourceIndex
Source§impl ReservedValue for ResourceIndex
impl ReservedValue for ResourceIndex
Source§fn reserved_value() -> ResourceIndex
fn reserved_value() -> ResourceIndex
Create an instance of the reserved value.
Source§fn is_reserved_value(&self) -> bool
fn is_reserved_value(&self) -> bool
Checks whether value is the reserved one.
Source§impl Serialize for ResourceIndex
impl Serialize for ResourceIndex
impl Copy for ResourceIndex
impl Eq for ResourceIndex
impl StructuralPartialEq for ResourceIndex
Auto Trait Implementations§
impl Freeze for ResourceIndex
impl RefUnwindSafe for ResourceIndex
impl Send for ResourceIndex
impl Sync for ResourceIndex
impl Unpin for ResourceIndex
impl UnwindSafe for ResourceIndex
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
Compare self to
key
and return true
if they are equal.