[−][src]Struct wasmer_wasi_fl::state::Inode
An index (and generation) into an Arena
.
To get an Index
, insert an element into an Arena
, and the Index
for
that element will be returned.
Examples
use generational_arena::Arena; let mut arena = Arena::new(); let idx = arena.insert(123); assert_eq!(arena[idx], 123);
Implementations
impl Index
[src]
pub fn from_raw_parts(a: usize, b: u64) -> Index
[src]
Create a new Index
from its raw parts.
The parts must have been returned from an earlier call to
into_raw_parts
.
Providing arbitrary values will lead to malformed indices and ultimately panics.
pub fn into_raw_parts(self) -> (usize, u64)
[src]
Convert this Index
into its raw parts.
This niche method is useful for converting an Index
into another
identifier type. Usually, you should prefer a newtype wrapper around
Index
like pub struct MyIdentifier(Index);
. However, for external
types whose definition you can't customize, but which you can construct
instances of, this method can be useful.
Trait Implementations
impl Clone for Index
[src]
impl Copy for Index
[src]
impl Debug for Index
[src]
impl<'de> Deserialize<'de> for Index
[src]
pub fn deserialize<D>(
deserializer: D
) -> Result<Index, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<Index, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl Eq for Index
[src]
impl Hash for Index
[src]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Index
[src]
pub fn cmp(&self, other: &Index) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Index> for Index
[src]
impl PartialOrd<Index> for Index
[src]
pub fn partial_cmp(&self, other: &Index) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Index) -> bool
[src]
pub fn le(&self, other: &Index) -> bool
[src]
pub fn gt(&self, other: &Index) -> bool
[src]
pub fn ge(&self, other: &Index) -> bool
[src]
impl Serialize for Index
[src]
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl StructuralEq for Index
[src]
impl StructuralPartialEq for Index
[src]
Auto Trait Implementations
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnwindSafe for Index
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
T: Serialize + ?Sized,
pub fn erased_serialize(
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
[src]
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,