[][src]Struct lark_ty::Generics

pub struct Generics<F: TypeFamily> { /* fields omitted */ }

A set of generic arguments; e.g., in a type like Vec<i32>, this would be [i32].

Methods

impl<F: TypeFamily> Generics<F>[src]

pub fn empty() -> Self[src]

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

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

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

pub fn iter(
    &self
) -> impl Iterator<Item = Generic<F>> + '_
[src]

pub fn elements(&self) -> &[Generic<F>][src]

pub fn push(&mut self, generic: Generic<F>)[src]

Append an item to this vector; if this set of generics is shared, this will clone the contents so that we own them privately. (Effectively generic lists are a copy-on-write data structure.)

Trait Implementations

impl<S, T> Map<S, T> for Generics<S> where
    S: TypeFamily,
    T: TypeFamily
[src]

type Output = Generics<T>

impl<F: Clone + TypeFamily> Clone for Generics<F>[src]

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

Performs copy-assignment from source. Read more

impl<F: TypeFamily, 'iter> IntoIterator for &'iter Generics<F>[src]

type IntoIter = Cloned<Iter<'iter, Generic<F>>>

Which kind of iterator are we turning this into?

type Item = Generic<F>

The type of the elements being iterated over.

impl<F: Eq + TypeFamily> Eq for Generics<F>[src]

impl<F> Extend<GenericKind<Ty<F>>> for Generics<F> where
    F: TypeFamily
[src]

Append items to this generics, cloning if it is shared with others. (Generics are effectively a simple persistent vector.)

impl<F: PartialEq + TypeFamily> PartialEq<Generics<F>> for Generics<F>[src]

impl<F: Hash + TypeFamily> Hash for Generics<F>[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<F> Index<BoundVar> for Generics<F> where
    F: TypeFamily
[src]

type Output = Generic<F>

The returned type after indexing.

impl<F: TypeFamily> FromIterator<GenericKind<Ty<F>>> for Generics<F>[src]

impl<F: Debug + TypeFamily> Debug for Generics<F>[src]

impl<F: TypeFamily> DebugWith for Generics<F>[src]

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]

Auto Trait Implementations

impl<F> Send for Generics<F> where
    <F as TypeFamily>::Base: Send + Sync,
    <F as TypeFamily>::Perm: Send + Sync,
    <F as TypeFamily>::Repr: Send + Sync

impl<F> Sync for Generics<F> where
    <F as TypeFamily>::Base: Send + Sync,
    <F as TypeFamily>::Perm: Send + Sync,
    <F as TypeFamily>::Repr: Send + Sync

Blanket Implementations

impl<T> From for T[src]

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, 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> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut 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<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