Struct gluon_base::types::ArcType [−][src]
pub struct ArcType<Id = Symbol> { /* fields omitted */ }
Expand description
A shared type which is atomically reference counted
Implementations
Returns the lowest level which this type contains. The level informs from where type variables where created.
Methods from Deref<Target = Type<Id, ArcType<Id>>>
Returns the name of self
Example:
Option a => Option
Int => Int
Trait Implementations
fn type_field_iter(&self) -> TypeFieldIterator<'_, Self>ⓘNotable traits for TypeFieldIterator<'a, T>impl<'a, Id: 'a, T> Iterator for TypeFieldIterator<'a, T> where
T: TypePtr<Id = Id>, type Item = &'a Field<T::SpannedId, Alias<Id, T>>;
fn type_field_iter(&self) -> TypeFieldIterator<'_, Self>ⓘNotable traits for TypeFieldIterator<'a, T>impl<'a, Id: 'a, T> Iterator for TypeFieldIterator<'a, T> where
T: TypePtr<Id = Id>, type Item = &'a Field<T::SpannedId, Alias<Id, T>>;
Notable traits for TypeFieldIterator<'a, T>
impl<'a, Id: 'a, T> Iterator for TypeFieldIterator<'a, T> where
T: TypePtr<Id = Id>, type Item = &'a Field<T::SpannedId, Alias<Id, T>>;
Returns an iterator over all type fields in a record.
{ Test, Test2, x, y } => [Test, Test2]
Read more
fn arg_iter(&self) -> ArgIterator<'_, Self>ⓘNotable traits for ArgIterator<'a, T>impl<'a, Id, T> Iterator for ArgIterator<'a, T> where
Id: 'a,
T: TypePtr<Id = Id>, type Item = &'a T;
Notable traits for ArgIterator<'a, T>
impl<'a, Id, T> Iterator for ArgIterator<'a, T> where
Id: 'a,
T: TypePtr<Id = Id>, type Item = &'a T;
fn implicit_arg_iter(&self) -> ImplicitArgIterator<'_, Self>ⓘNotable traits for ImplicitArgIterator<'a, T>impl<'a, Id, T> Iterator for ImplicitArgIterator<'a, T> where
Id: 'a,
T: TypePtr<Id = Id>, type Item = &'a T;
Notable traits for ImplicitArgIterator<'a, T>
impl<'a, Id, T> Iterator for ImplicitArgIterator<'a, T> where
Id: 'a,
T: TypePtr<Id = Id>, type Item = &'a T;
fn row_iter(&self) -> RowIterator<'_, Self>ⓘNotable traits for RowIterator<'a, T>impl<'a, Id: 'a, T> Iterator for RowIterator<'a, T> where
T: TypePtr<Id = Id>, type Item = &'a Field<T::SpannedId, T>;
fn row_iter(&self) -> RowIterator<'_, Self>ⓘNotable traits for RowIterator<'a, T>impl<'a, Id: 'a, T> Iterator for RowIterator<'a, T> where
T: TypePtr<Id = Id>, type Item = &'a Field<T::SpannedId, T>;
Notable traits for RowIterator<'a, T>
impl<'a, Id: 'a, T> Iterator for RowIterator<'a, T> where
T: TypePtr<Id = Id>, type Item = &'a Field<T::SpannedId, T>;
Returns an iterator over all fields in a record.
{ Test, Test2, x, y } => [x, y]
Read more
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::SpannedId: Clone,
Self: Clone,
Self::Types: Clone,
Self::Generics: Clone,
Self::Fields: Clone,
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::SpannedId: Clone,
Self: Clone,
Self::Types: Clone,
Self::Generics: Clone,
Self::Fields: Clone,
fn forall_scope_iter(&self) -> ForallScopeIter<'_, Self>ⓘNotable traits for ForallScopeIter<'a, T>impl<'a, T, Id: 'a> Iterator for ForallScopeIter<'a, T> where
T: TypePtr<Id = Id>, type Item = &'a Generic<Id>;
Notable traits for ForallScopeIter<'a, T>
impl<'a, T, Id: 'a> Iterator for ForallScopeIter<'a, T> where
T: TypePtr<Id = Id>, type Item = &'a Generic<Id>;
fn pretty<'a, A>(
&'a self,
arena: &'a Arena<'a, A>
) -> DocBuilder<'a, Arena<'a, A>, A> where
Self::Id: AsRef<str> + 'a,
Self::SpannedId: AsRef<str> + AsId<Self::Id> + 'a,
A: Clone,
Self: HasMetadata + HasSpan,
fn apply_args<'a>(
&self,
params: &[Generic<Self::Id>],
args: &'a [Self],
interner: &mut impl TypeContext<Self::Id, Self>,
named_variables: &mut FnvMap<Self::Id, Self>
) -> Option<Self> where
Self::Id: Clone + Eq + Hash,
Self::SpannedId: Clone,
Self: Display,
Self::Id: Display,
Self::Types: Clone + FromIterator<Self>,
Self::Generics: Clone,
Self::Fields: Clone,
fn apply_args<'a>(
&self,
params: &[Generic<Self::Id>],
args: &'a [Self],
interner: &mut impl TypeContext<Self::Id, Self>,
named_variables: &mut FnvMap<Self::Id, Self>
) -> Option<Self> where
Self::Id: Clone + Eq + Hash,
Self::SpannedId: Clone,
Self: Display,
Self::Id: Display,
Self::Types: Clone + FromIterator<Self>,
Self::Generics: Clone,
Self::Fields: Clone,
Applies a list of arguments to a parameterised type, returning Some
if the substitution was successful. Read more
fn arg_application<'a>(
&self,
params: &[Generic<Self::Id>],
args: &'a [Self],
interner: &mut impl TypeContext<Self::Id, Self>,
named_variables: &mut FnvMap<Self::Id, Self>
) -> Option<(Self, &'a [Self])> where
Self::Id: Clone + Eq + Hash,
Self: Display,
Self::Id: Display,
Self::Types: FromIterator<Self>,
Self::Generics: Clone,
Self::Fields: Clone,
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,
Self::SpannedId: Clone,
Self::Types: Clone,
Self::Generics: Clone,
Self::Fields: Clone,
fn skolemize(
&self,
interner: &mut impl Substitution<Self::Id, Self>,
named_variables: &mut FnvMap<Self::Id, Self>
) -> Self where
Self::Id: Clone + Eq + Hash,
Self::SpannedId: Clone,
Self::Types: Clone,
Self::Generics: Clone,
Self::Fields: Clone,
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,
Self::SpannedId: Clone,
Self::Types: Clone,
Self::Generics: FromIterator<Generic<Self::Id>> + Clone,
Self::Fields: Clone,
Auto Trait Implementations
impl<Id> RefUnwindSafe for ArcType<Id> where
Id: RefUnwindSafe,
impl<Id> UnwindSafe for ArcType<Id> where
Id: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more