[−][src]Struct gluon_base::types::ArcType
A shared type which is atomically reference counted
Implementations
impl<Id> ArcType<Id> where
Id: PartialEq,
[src]
Id: PartialEq,
impl<Id> ArcType<Id>
[src]
pub fn set(into: &mut Self, typ: Type<Id, Self>) where
Id: Clone + PartialEq,
[src]
Id: Clone + PartialEq,
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]
Id: PartialEq,
pub fn forall_params(&self) -> impl Iterator<Item = &Generic<Id>>
[src]
Methods from Deref<Target = Type<Id, ArcType<Id>>>
pub fn as_variable(&self) -> Option<&TypeVariable>
[src]
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]
T: Clone,
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]
Id: PartialEq,
impl<Id> Deref for ArcType<Id>
[src]
type Target = Type<Id, ArcType<Id>>
The resulting type after dereferencing.
fn deref(&self) -> &Type<Id, ArcType<Id>>
[src]
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]
Id: PartialEq,
impl<Id> HasMetadata for ArcType<Id>
[src]
impl<Id> HasSpan for ArcType<Id>
[src]
impl<Id: Hash> Hash for ArcType<Id>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
I: AsRef<str> + AsId<I>,
A: Clone,
fn to_doc(
&'a self,
arena: &'a Arena<'a, A>,
source: &'a dyn Source
) -> DocBuilder<'a, Arena<'a, A>, A>
[src]
&'a self,
arena: &'a Arena<'a, A>,
source: &'a dyn Source
) -> DocBuilder<'a, Arena<'a, A>, A>
impl<'a, I, A> ToDoc<'a, Arena<'a, A>, A, ()> for ArcType<I> where
I: AsRef<str> + AsId<I>,
A: Clone,
[src]
I: AsRef<str> + AsId<I>,
A: Clone,
impl TypeContextAlloc for ArcType
[src]
impl<Id> TypeExt for ArcType<Id>
[src]
fn strong_count(typ: &ArcType<Id>) -> usize
[src]
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>>;
[src]
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 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;
[src]
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;
[src]
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>;
[src]
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 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::SpannedId: Clone,
Self: Clone,
Self::Types: Clone,
Self::Generics: Clone,
Self::Fields: Clone,
[src]
&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,
[src]
&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>;
[src]
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,
[src]
&'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,
[src]
&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 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,
[src]
&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,
[src]
&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,
[src]
&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,
[src]
&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,
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>>>
fn flags(&self) -> Flags
[src]
fn spine(&self) -> &Self
[src]
fn display<A>(&self, width: usize) -> TypeFormatter<'_, Self::Id, Self, A> where
Self::Id: AsRef<str>,
Self::SpannedId: AsRef<str>,
[src]
Self::Id: AsRef<str>,
Self::SpannedId: AsRef<str>,
Auto Trait Implementations
impl<Id> RefUnwindSafe for ArcType<Id> where
Id: RefUnwindSafe,
Id: RefUnwindSafe,
impl<Id> Send for ArcType<Id> where
Id: Send + Sync,
Id: Send + Sync,
impl<Id> Sync for ArcType<Id> where
Id: Send + Sync,
Id: Send + Sync,
impl<Id> Unpin for ArcType<Id>
impl<Id> UnwindSafe for ArcType<Id> where
Id: RefUnwindSafe,
Id: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<Id> AsId<Id> for Id where
Id: ?Sized,
[src]
Id: ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,