[][src]Struct cfgrammar::SIdx

pub struct SIdx<T>(pub T);

A type specifically for symbol indices (within a production).

It is guaranteed that SIdx can be converted, without loss of precision, to usize with the idiom SIdx::from(x_usize). usize values can be converted to RIdx, causing a panic if this would lead to a loss of precision with usize::from(y_sidx).

Methods

impl<T: PrimInt + Unsigned> SIdx<T>[src]

pub fn as_storaget(&self) -> T[src]

Trait Implementations

impl<T: Clone> Clone for SIdx<T>[src]

impl<T: Copy> Copy for SIdx<T>[src]

impl<T: Debug> Debug for SIdx<T>[src]

impl<T: Eq> Eq for SIdx<T>[src]

impl<T: PrimInt + Unsigned> From<SIdx<T>> for usize[src]

impl<T: PrimInt + Unsigned> From<SIdx<T>> for u32[src]

impl<T: Hash> Hash for SIdx<T>[src]

impl<T: Ord> Ord for SIdx<T>[src]

impl<T: PartialEq> PartialEq<SIdx<T>> for SIdx<T>[src]

impl<T: PartialOrd> PartialOrd<SIdx<T>> for SIdx<T>[src]

impl<T> StructuralEq for SIdx<T>[src]

impl<T> StructuralPartialEq for SIdx<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for SIdx<T> where
    T: RefUnwindSafe

impl<T> Send for SIdx<T> where
    T: Send

impl<T> Sync for SIdx<T> where
    T: Sync

impl<T> Unpin for SIdx<T> where
    T: Unpin

impl<T> UnwindSafe for SIdx<T> where
    T: UnwindSafe

Blanket Implementations

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

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

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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.