Struct gluon_base::types::ArcType [−][src]
pub struct ArcType<Id = Symbol> { /* fields omitted */ }
A shared type which is atomically reference counted
Methods
impl<Id> ArcType<Id>
[src]
impl<Id> ArcType<Id>
pub fn new(typ: Type<Id, ArcType<Id>>) -> ArcType<Id>
[src]
pub fn new(typ: Type<Id, ArcType<Id>>) -> ArcType<Id>
ⓘImportant traits for TypeFieldIterator<'a, T>pub fn type_field_iter(&self) -> TypeFieldIterator<Self>
[src]
pub fn type_field_iter(&self) -> TypeFieldIterator<Self>
Returns an iterator over all type fields in a record.
{ Test, Test2, x, y } => [Test, Test2]
ⓘImportant traits for RowIterator<'a, T>pub fn row_iter(&self) -> RowIterator<Self>
[src]
pub fn row_iter(&self) -> RowIterator<Self>
Returns an iterator over all fields in a record.
{ Test, Test2, x, y } => [x, y]
pub fn strong_count(typ: &ArcType<Id>) -> usize
[src]
pub fn strong_count(typ: &ArcType<Id>) -> usize
pub fn remove_implicit_args(&self) -> &ArcType<Id>
[src]
pub fn remove_implicit_args(&self) -> &ArcType<Id>
pub fn remove_forall(&self) -> &ArcType<Id>
[src]
pub fn remove_forall(&self) -> &ArcType<Id>
pub fn remove_forall_and_implicit_args(&self) -> &ArcType<Id>
[src]
pub fn remove_forall_and_implicit_args(&self) -> &ArcType<Id>
pub fn skolemize(
&self,
named_variables: &mut FnvMap<Id, ArcType<Id>>
) -> ArcType<Id> where
Id: Clone + Eq + Hash,
[src]
pub fn skolemize(
&self,
named_variables: &mut FnvMap<Id, ArcType<Id>>
) -> ArcType<Id> where
Id: Clone + Eq + Hash,
pub fn instantiate_generics(
&self,
named_variables: &mut FnvMap<Id, ArcType<Id>>
) -> ArcType<Id> where
Id: Clone + Eq + Hash,
[src]
pub fn instantiate_generics(
&self,
named_variables: &mut FnvMap<Id, ArcType<Id>>
) -> ArcType<Id> where
Id: Clone + Eq + Hash,
pub fn instantiate_generics_(
&self,
named_variables: &FnvMap<Id, ArcType<Id>>
) -> Option<ArcType<Id>> where
Id: Clone + Eq + Hash,
[src]
pub fn instantiate_generics_(
&self,
named_variables: &FnvMap<Id, ArcType<Id>>
) -> Option<ArcType<Id>> where
Id: Clone + Eq + Hash,
ⓘImportant traits for ForallScopeIter<'a, Id>pub fn forall_scope_iter(&self) -> ForallScopeIter<Id>
[src]
pub fn forall_scope_iter(&self) -> ForallScopeIter<Id>
pub fn pretty<'a>(&'a self, arena: &'a Arena<'a>) -> DocBuilder<'a, Arena<'a>> where
Id: AsRef<str>,
[src]
pub fn pretty<'a>(&'a self, arena: &'a Arena<'a>) -> DocBuilder<'a, Arena<'a>> where
Id: AsRef<str>,
pub fn display(&self, width: usize) -> TypeFormatter<Id, Self>
[src]
pub fn display(&self, width: usize) -> TypeFormatter<Id, Self>
impl ArcType
[src]
impl ArcType
pub fn params_mut(&mut self) -> &mut [Generic<Symbol>]
[src]
pub fn params_mut(&mut self) -> &mut [Generic<Symbol>]
pub fn apply_args(&self, args: &[ArcType]) -> Option<ArcType>
[src]
pub fn apply_args(&self, args: &[ArcType]) -> Option<ArcType>
Applies a list of arguments to a parameterised type, returning Some
if the substitution was successful.
Example:
self = forall e t . | Err e | Ok t
args = [Error, Option a]
result = | Err Error | Ok (Option a)
impl<Id> ArcType<Id>
[src]
impl<Id> ArcType<Id>
pub fn level(&self) -> u32
[src]
pub fn level(&self) -> u32
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>>>
pub fn as_variable(&self) -> Option<&TypeVariable>
[src]
pub fn as_variable(&self) -> Option<&TypeVariable>
pub fn as_function(&self) -> Option<(&T, &T)>
[src]
pub fn as_function(&self) -> Option<(&T, &T)>
pub fn as_function_with_type(&self) -> Option<(ArgType, &T, &T)>
[src]
pub fn as_function_with_type(&self) -> Option<(ArgType, &T, &T)>
pub fn unapplied_args(&self) -> Cow<[T]> where
T: Clone,
[src]
pub fn unapplied_args(&self) -> Cow<[T]> where
T: Clone,
pub fn alias_ident(&self) -> Option<&Id>
[src]
pub fn alias_ident(&self) -> Option<&Id>
pub fn is_non_polymorphic_record(&self) -> bool
[src]
pub fn is_non_polymorphic_record(&self) -> bool
pub fn params(&self) -> &[Generic<Id>]
[src]
pub fn params(&self) -> &[Generic<Id>]
pub fn kind(&self) -> Cow<ArcKind>
[src]
pub fn kind(&self) -> Cow<ArcKind>
pub fn name(&self) -> Option<&SymbolRef>
[src]
pub fn name(&self) -> Option<&SymbolRef>
Returns the name of self
Example:
Option a => Option
Int => Int
Trait Implementations
impl<Id: Eq> Eq for ArcType<Id>
[src]
impl<Id: Eq> Eq for ArcType<Id>
impl<Id: PartialEq> PartialEq for ArcType<Id>
[src]
impl<Id: PartialEq> PartialEq for ArcType<Id>
fn eq(&self, other: &ArcType<Id>) -> bool
[src]
fn eq(&self, other: &ArcType<Id>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ArcType<Id>) -> bool
[src]
fn ne(&self, other: &ArcType<Id>) -> bool
This method tests for !=
.
impl<Id: Hash> Hash for ArcType<Id>
[src]
impl<Id: Hash> Hash for ArcType<Id>
fn hash<__HId: Hasher>(&self, state: &mut __HId)
[src]
fn hash<__HId: Hasher>(&self, state: &mut __HId)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<Id> Clone for ArcType<Id>
[src]
impl<Id> Clone for ArcType<Id>
fn clone(&self) -> ArcType<Id>
[src]
fn clone(&self) -> ArcType<Id>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<Id: Debug> Debug for ArcType<Id>
[src]
impl<Id: Debug> Debug for ArcType<Id>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<Id: AsRef<str>> Display for ArcType<Id>
[src]
impl<Id: AsRef<str>> Display for ArcType<Id>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<Id> Deref for ArcType<Id>
[src]
impl<Id> Deref for ArcType<Id>
type Target = Type<Id, ArcType<Id>>
The resulting type after dereferencing.
fn deref(&self) -> &Type<Id, ArcType<Id>>
[src]
fn deref(&self) -> &Type<Id, ArcType<Id>>
Dereferences the value.
impl<Id> HasSpan for ArcType<Id>
[src]
impl<Id> HasSpan for ArcType<Id>
impl<Id> Commented for ArcType<Id>
[src]
impl<Id> Commented for ArcType<Id>
impl<Id> From<Type<Id, ArcType<Id>>> for ArcType<Id>
[src]
impl<Id> From<Type<Id, ArcType<Id>>> for ArcType<Id>
impl<'a, I> ToDoc<'a, Arena<'a>, ()> for ArcType<I> where
I: AsRef<str>,
[src]
impl<'a, I> ToDoc<'a, Arena<'a>, ()> for ArcType<I> where
I: AsRef<str>,
impl<'a, I> ToDoc<'a, Arena<'a>, &'a Source> for ArcType<I> where
I: AsRef<str>,
[src]
impl<'a, I> ToDoc<'a, Arena<'a>, &'a Source> for ArcType<I> where
I: AsRef<str>,