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

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

A shared type which is atomically reference counted

Implementations

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

pub fn new(typ: Type<Id, ArcType<Id>>) -> ArcType<Id>[src]

impl<Id> ArcType<Id>[src]

pub fn set(into: &mut Self, typ: Type<Id, Self>) where
    Id: Clone + PartialEq
[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 where
    Id: PartialEq
[src]

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

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

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

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

pub fn owned_name(&self) -> Option<SymbolKey>[src]

Trait Implementations

impl<'ast, Id> AstClone<'ast, Id> for ArcType<Id>[src]

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

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

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

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

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

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

The resulting type after dereferencing.

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

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

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

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

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

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

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

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

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

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

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

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

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

impl TypeContextAlloc for ArcType[src]

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

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

type Id = Id

type SpannedId = Id

type Types = AppVec<Self>

type Generics = Vec<Generic<Id>>

type Fields = Vec<Field<Id, Self>>

type TypeFields = Vec<Field<Id, Alias<Id, Self>>>

Auto Trait Implementations

impl<Id> RefUnwindSafe for ArcType<Id> where
    Id: RefUnwindSafe

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

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

impl<Id> Unpin for ArcType<Id>

impl<Id> UnwindSafe for ArcType<Id> where
    Id: RefUnwindSafe

Blanket Implementations

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

impl<Id> AsId<Id> for Id where
    Id: ?Sized
[src]

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

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

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.