[]Struct syntax::symbol::SymbolIndex

pub struct SymbolIndex { /* fields omitted */ }

Methods

impl SymbolIndex

pub const MAX_AS_U32: u32

pub const MAX: SymbolIndex

pub fn from_usize(value: usize) -> SymbolIndex

pub fn from_u32(value: u32) -> SymbolIndex

pub const fn from_u32_const(value: u32) -> SymbolIndex

Hacky variant of from_u32 for use in constants. This version checks the "max" constraint by using an invalid array dereference.

pub const unsafe fn from_u32_unchecked(value: u32) -> SymbolIndex

pub fn index(self) -> usize

Extracts the value of this index as an integer.

pub fn as_u32(self) -> u32

Extracts the value of this index as a u32.

pub fn as_usize(self) -> usize

Extracts the value of this index as a usize.

Trait Implementations

impl Hash for SymbolIndex

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Ord for SymbolIndex

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Debug for SymbolIndex

impl Clone for SymbolIndex

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Idx for SymbolIndex

fn increment_by(&mut self, amount: usize)[src]

impl From<u32> for SymbolIndex

impl From<usize> for SymbolIndex

impl PartialEq<SymbolIndex> for SymbolIndex

impl PartialOrd<SymbolIndex> for SymbolIndex

impl Encodable for SymbolIndex

impl Step for SymbolIndex

impl Decodable for SymbolIndex

impl Eq for SymbolIndex

impl Copy for SymbolIndex

Auto Trait Implementations

impl Send for SymbolIndex

impl Sync for SymbolIndex

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[src]

impl<T> Decodable for T where
    T: UseSpecializedDecodable
[src]

impl<E> SpecializationError for E[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> Erased for T[src]