[][src]Struct gluon_base::types::ArcType

pub struct ArcType<Id = Symbol> { /* fields omitted */ }

A shared type which is atomically reference counted

Methods

impl<Id> ArcType<Id>[src]

pub fn set(into: &mut Self, typ: Type<Id, Self>) where
    Id: Clone
[src]

pub fn level(&self) -> u32[src]

Returns the lowest level which this type contains. The level informs from where type variables where created.

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

pub fn forall_params(&self) -> impl Iterator<Item = &Generic<Id>>[src]

Methods from Deref<Target = Type<Id, ArcType<Id>>>

pub fn as_function(&self) -> Option<(&T, &T)>[src]

pub fn as_explicit_function(&self) -> Option<(&T, &T)>[src]

pub fn as_function_with_type(&self) -> Option<(ArgType, &T, &T)>[src]

pub fn unapplied_args(&self) -> Cow<[T]> where
    T: Clone
[src]

pub fn alias_ident(&self) -> Option<&Id>[src]

pub fn applied_alias(&self) -> Option<&AliasRef<Id, T>>[src]

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

pub fn params(&self) -> &[Generic<Id>][src]

pub fn kind<'k>(&'k self, cache: &'k KindCache) -> Cow<'k, ArcKind>[src]

pub fn name(&self) -> Option<&SymbolRef>[src]

Returns the name of self Example: Option a => Option Int => Int

Trait Implementations

impl<Id> Commented for ArcType<Id>[src]

impl<Id> HasSpan for ArcType<Id>[src]

impl<Id> TypeExt for ArcType<Id>[src]

type Id = Id

Important traits for TypeFieldIterator<'a, T>
fn type_field_iter(&self) -> TypeFieldIterator<Self>[src]

Returns an iterator over all type fields in a record. { Test, Test2, x, y } => [Test, Test2] Read more

Important traits for RowIterator<'a, T>
fn row_iter(&self) -> RowIterator<Self>[src]

Returns an iterator over all fields in a record. { Test, Test2, x, y } => [x, y] Read more

fn remove_implicit_args<'a>(&'a self) -> &'a Self[src]

fn remove_forall<'a>(&'a self) -> &'a Self[src]

fn remove_forall_and_implicit_args<'a>(&'a self) -> &'a Self[src]

fn replace_generics(
    &self,
    interner: &mut impl TypeContext<Self::Id, Self>,
    named_variables: &mut FnvMap<Self::Id, Self>
) -> Option<Self> where
    Self::Id: Clone + Eq + Hash,
    Self: Clone
[src]

Important traits for ForallScopeIter<'a, T>
fn forall_scope_iter(&self) -> ForallScopeIter<Self>[src]

fn pretty<'a, A>(
    &'a self,
    arena: &'a Arena<'a, A>
) -> DocBuilder<'a, Arena<'a, A>, A> where
    Self::Id: AsRef<str> + 'a,
    A: Clone,
    Self: Commented + HasSpan
[src]

fn display<A>(&self, width: usize) -> TypeFormatter<Self::Id, Self, A> where
    Self::Id: AsRef<str>, 
[src]

fn apply_args(
    &self,
    params: &[Generic<Self::Id>],
    args: &[Self],
    interner: &mut impl TypeContext<Self::Id, Self>
) -> Option<Self> where
    Self::Id: Clone + Eq + Hash
[src]

Applies a list of arguments to a parameterised type, returning Some if the substitution was successful. Read more

fn instantiate_generics(
    &self,
    interner: &mut impl Substitution<Self::Id, Self>,
    named_variables: &mut FnvMap<Self::Id, Self>
) -> Self where
    Self::Id: Clone + Eq + Hash
[src]

fn skolemize(
    &self,
    interner: &mut impl Substitution<Self::Id, Self>,
    named_variables: &mut FnvMap<Self::Id, Self>
) -> Self where
    Self::Id: Clone + Eq + Hash
[src]

fn skolemize_in(
    &self,
    interner: &mut impl Substitution<Self::Id, Self>,
    named_variables: &mut FnvMap<Self::Id, Self>,
    f: impl FnOnce(Self) -> Self
) -> Self where
    Self::Id: Clone + Eq + Hash
[src]

impl<'a, I, A> ToDoc<'a, Arena<Doc<'a, RefDoc<'a, A>, A>>, A, ()> for ArcType<I> where
    I: AsRef<str>,
    A: Clone
[src]

impl<'a, I, A> ToDoc<'a, Arena<Doc<'a, RefDoc<'a, A>, A>>, A, &'a (dyn Source + 'a)> for ArcType<I> where
    I: AsRef<str>,
    A: Clone
[src]

impl TypeContextAlloc for ArcType[src]

type Id = Symbol

impl<Id: PartialEq> PartialEq<ArcType<Id>> for ArcType<Id>[src]

impl<Id> Default for ArcType<Id>[src]

impl<Id> From<Type<Id, ArcType<Id>>> for ArcType<Id>[src]

impl<Id> Clone for ArcType<Id>[src]

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

Performs copy-assignment from source. Read more

impl<Id: Eq> Eq for ArcType<Id>[src]

impl<Id: AsRef<str>> Display for ArcType<Id>[src]

impl<Id: Debug> Debug for ArcType<Id>[src]

impl<Id: Hash> Hash for ArcType<Id>[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<Id> Deref for ArcType<Id>[src]

type Target = Type<Id, ArcType<Id>>

The resulting type after dereferencing.

impl<Id> Pointer for ArcType<Id>[src]

impl<Id> Borrow<Type<Id, ArcType<Id>>> for ArcType<Id>[src]

impl<Id> StableDeref for ArcType<Id>[src]

Auto Trait Implementations

impl<Id> Send for ArcType<Id> where
    Id: Send + Sync

impl<Id> Sync for ArcType<Id> where
    Id: Send + 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> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

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

type Error = Infallible

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

The type returned in the event of a conversion error.