[−]Struct syntax::symbol::SymbolIndex
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
Extract value of this index as an integer.
pub fn as_u32(self) -> u32
Extract value of this index as a usize.
pub fn as_usize(self) -> usize
Extract value of this index as a u32.
Trait Implementations
impl Copy for SymbolIndex
impl Ord for SymbolIndex
fn cmp(&self, other: &SymbolIndex) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Decodable for SymbolIndex
impl Eq for SymbolIndex
impl Step for SymbolIndex
fn steps_between(start: &SymbolIndex, end: &SymbolIndex) -> Option<usize>
fn replace_one(&mut self) -> SymbolIndex
fn replace_zero(&mut self) -> SymbolIndex
fn add_one(&self) -> SymbolIndex
fn sub_one(&self) -> SymbolIndex
fn add_usize(&self, u: usize) -> Option<SymbolIndex>
impl From<usize> for SymbolIndex
fn from(value: usize) -> SymbolIndex
impl From<u32> for SymbolIndex
fn from(value: u32) -> SymbolIndex
impl PartialEq<SymbolIndex> for SymbolIndex
fn eq(&self, other: &SymbolIndex) -> bool
fn ne(&self, other: &SymbolIndex) -> bool
impl Encodable for SymbolIndex
impl Debug for SymbolIndex
impl Clone for SymbolIndex
fn clone(&self) -> SymbolIndex
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialOrd<SymbolIndex> for SymbolIndex
fn partial_cmp(&self, other: &SymbolIndex) -> Option<Ordering>
fn lt(&self, other: &SymbolIndex) -> bool
fn le(&self, other: &SymbolIndex) -> bool
fn gt(&self, other: &SymbolIndex) -> bool
fn ge(&self, other: &SymbolIndex) -> bool
impl Hash for SymbolIndex
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Idx for SymbolIndex
fn new(value: usize) -> SymbolIndex
fn index(self) -> usize
fn increment_by(&mut self, amount: usize)
[src]
Auto Trait Implementations
impl Send for SymbolIndex
impl Sync for SymbolIndex
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized,
[src]
T: UseSpecializedEncodable + ?Sized,
impl<T> Decodable for T where
T: UseSpecializedDecodable,
[src]
T: UseSpecializedDecodable,
impl<E> SpecializationError for E
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,