[][src]Struct lark_hir::List

pub struct List<I: HirIndex> { /* fields omitted */ }

A list of "HIR indices" of type I.

Methods

impl<I: HirIndex> List<I>[src]

pub fn from_iterator(
    fn_body: impl AsMut<FnBodyTables>,
    iterator: impl IntoIterator<Item = I>
) -> Self
[src]

Creates a List containing the results of from_iterator.

pub fn is_empty(&self) -> bool[src]

pub fn len(&self) -> usize[src]

pub fn first(
    &self,
    fn_body: &impl AsRef<FnBodyTables>
) -> Option<I>
[src]

pub fn first_data(
    &self,
    fn_body: &impl AsRef<FnBodyTables>
) -> Option<I::Data>
[src]

pub fn iter<'f>(
    &self,
    fn_body: &'f impl AsRef<FnBodyTables>
) -> impl Iterator<Item = I> + 'f
[src]

Iterate over the elements in the list.

pub fn iter_data<'f>(
    &self,
    fn_body: &'f impl AsRef<FnBodyTables>
) -> impl Iterator<Item = I::Data> + 'f
[src]

Iterate over the data for each the element in the list.

pub fn iter_enumerated_data<'f>(
    &self,
    fn_body: &'f impl AsRef<FnBodyTables>
) -> impl Iterator<Item = (I, I::Data)> + 'f
[src]

Iterate over the elements in the list and their associated data.

Trait Implementations

impl<I: Eq + HirIndex> Eq for List<I>[src]

impl<I: Clone + HirIndex> Clone for List<I>[src]

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

Performs copy-assignment from source. Read more

impl<I: Copy + HirIndex> Copy for List<I>[src]

impl<I: PartialEq + HirIndex> PartialEq<List<I>> for List<I>[src]

impl<I: HirIndex> Default for List<I>[src]

impl<I: Hash + HirIndex> Hash for List<I>[src]

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<I: Debug + HirIndex> Debug for List<I>[src]

impl<I: HirIndex> DebugWith for List<I>

fn debug_with<Cx>(&'me self, cx: &'me Cx) -> DebugCxPair<'me, &'me Self, Cx> where
    Cx: ?Sized
[src]

fn into_debug_with<Cx>(self, cx: &'me Cx) -> DebugCxPair<'me, Self, Cx> where
    Cx: ?Sized
[src]

impl<Cx, I> FmtWithSpecialized<Cx> for List<I> where
    Cx: AsRef<FnBodyTables>,
    I: HirIndex
[src]

Auto Trait Implementations

impl<I> Send for List<I> where
    I: Send

impl<I> Sync for List<I> where
    I: Sync

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = !

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

The type returned in the event of a conversion error.

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

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

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.

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

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

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

impl<Cx, T> FmtWithSpecialized for T where
    Cx: ?Sized,
    T: Debug + ?Sized
[src]

impl<T> Erased for T