[−][src]Struct gluon_base::ast::AstType
Implementations
impl<'ast, Id> AstType<'ast, Id>
[src]
pub fn new(
arena: ArenaRef<'_, 'ast, Id>,
typ: Spanned<Type<Id, AstType<'ast, Id>>, BytePos>
) -> Self
[src]
arena: ArenaRef<'_, 'ast, Id>,
typ: Spanned<Type<Id, AstType<'ast, Id>>, BytePos>
) -> Self
pub fn new_no_loc(
arena: ArenaRef<'_, 'ast, Id>,
typ: Type<Id, AstType<'ast, Id>>
) -> Self
[src]
arena: ArenaRef<'_, 'ast, Id>,
typ: Type<Id, AstType<'ast, Id>>
) -> Self
pub fn with_metadata<T>(
arena: ArenaRef<'_, 'ast, Id>,
metadata: T,
typ: Spanned<Type<Id, AstType<'ast, Id>>, BytePos>
) -> Self where
T: Into<BaseMetadata<'ast>>,
[src]
arena: ArenaRef<'_, 'ast, Id>,
metadata: T,
typ: Spanned<Type<Id, AstType<'ast, Id>>, BytePos>
) -> Self where
T: Into<BaseMetadata<'ast>>,
pub fn set_metadata<T>(&mut self, metadata: T) where
T: Into<BaseMetadata<'ast>>,
[src]
T: Into<BaseMetadata<'ast>>,
pub fn remove_single_forall(&mut self) -> &mut AstType<'ast, Id>
[src]
Methods from Deref<Target = Type<Id, AstType<'ast, 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> AsMut<Spanned<Type<Id, AstType<'ast, Id>>, ByteIndex>> for AstType<'ast, Id>
[src]
fn as_mut(&mut self) -> &mut SpannedAstType<'ast, Id>
[src]
impl<'ast, Id> AstAlloc<'ast, Id> for AstType<'ast, Id>
[src]
fn alloc(self, arena: &'ast Arena<'ast, Id>) -> &'ast mut Self
[src]
fn alloc_extend(
iter: impl IntoIterator<Item = Self>,
arena: &'ast Arena<'ast, Id>
) -> &'ast mut [Self]
[src]
iter: impl IntoIterator<Item = Self>,
arena: &'ast Arena<'ast, Id>
) -> &'ast mut [Self]
impl<'ast, Id> AstClone<'ast, Id> for AstType<'ast, Id> where
Id: AstClone<'ast, Id>,
Id: Clone,
[src]
Id: AstClone<'ast, Id>,
Id: Clone,
impl<'ast, Id: Debug> Debug for AstType<'ast, Id>
[src]
impl<'ast, Id> Deref for AstType<'ast, Id>
[src]
type Target = Type<Id, AstType<'ast, Id>>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<'ast, Id> DerefMut for AstType<'ast, Id>
[src]
impl<'_, Id: AsRef<str>> Display for AstType<'_, Id>
[src]
impl<'ast, Id: Eq> Eq for AstType<'ast, Id>
[src]
impl<'_, Id> HasMetadata for AstType<'_, Id>
[src]
impl<'_, Id> HasSpan for AstType<'_, Id>
[src]
impl<'ast, Id: PartialEq> PartialEq<AstType<'ast, Id>> for AstType<'ast, Id>
[src]
fn eq(&self, other: &AstType<'ast, Id>) -> bool
[src]
fn ne(&self, other: &AstType<'ast, Id>) -> bool
[src]
impl<'ast, Id> RefUnwindSafe for AstType<'ast, Id> where
Id: RefUnwindSafe,
[src]
Id: RefUnwindSafe,
impl<'ast, Id> Send for AstType<'ast, Id> where
Id: Send,
[src]
Id: Send,
impl<'ast, Id> StructuralEq for AstType<'ast, Id>
[src]
impl<'ast, Id> StructuralPartialEq for AstType<'ast, Id>
[src]
impl<'ast, Id> Sync for AstType<'ast, Id> where
Id: Sync,
[src]
Id: Sync,
impl<'ast, '_, Id> TypeContext<Id, AstType<'ast, Id>> for ArenaRef<'_, 'ast, Id>
[src]
fn intern(&mut self, typ: Type<Id, AstType<'ast, Id>>) -> AstType<'ast, Id>
[src]
fn intern_types(
&mut self,
types: impl IntoIterator<Item = AstType<'ast, Id>>
) -> &'ast mut [AstType<'ast, Id>]
[src]
&mut self,
types: impl IntoIterator<Item = AstType<'ast, Id>>
) -> &'ast mut [AstType<'ast, Id>]
fn intern_generics(
&mut self,
types: impl IntoIterator<Item = Generic<Id>>
) -> &'ast mut [Generic<Id>]
[src]
&mut self,
types: impl IntoIterator<Item = Generic<Id>>
) -> &'ast mut [Generic<Id>]
fn intern_fields(
&mut self,
types: impl IntoIterator<Item = Field<Id, AstType<'ast, Id>>>
) -> &'ast mut [Field<Id, AstType<'ast, Id>>]
[src]
&mut self,
types: impl IntoIterator<Item = Field<Id, AstType<'ast, Id>>>
) -> &'ast mut [Field<Id, AstType<'ast, Id>>]
fn intern_type_fields(
&mut self,
types: impl IntoIterator<Item = Field<Id, Alias<Id, AstType<'ast, Id>>>>
) -> &'ast mut [Field<Id, Alias<Id, AstType<'ast, Id>>>]
[src]
&mut self,
types: impl IntoIterator<Item = Field<Id, Alias<Id, AstType<'ast, Id>>>>
) -> &'ast mut [Field<Id, Alias<Id, AstType<'ast, Id>>>]
fn intern_flags(
&mut self,
typ: Type<Id, AstType<'ast, Id>>,
_flags: Flags
) -> AstType<'ast, Id>
[src]
&mut self,
typ: Type<Id, AstType<'ast, Id>>,
_flags: Flags
) -> AstType<'ast, Id>
fn hole(&mut self) -> T
[src]
fn opaque(&mut self) -> T
[src]
fn error(&mut self) -> T
[src]
fn builtin(&mut self, typ: BuiltinType) -> T
[src]
fn forall(&mut self, params: T::Generics, typ: T) -> T
[src]
fn with_forall(&mut self, typ: T, from: &T) -> T where
Id: Clone + Eq + Hash,
T: TypeExt<Id = Id> + Clone,
T::Generics: FromIterator<Generic<Id>> + Clone,
[src]
Id: Clone + Eq + Hash,
T: TypeExt<Id = Id> + Clone,
T::Generics: FromIterator<Generic<Id>> + Clone,
fn array(&mut self, typ: T) -> T
[src]
fn array_builtin(&mut self) -> T
[src]
fn app(&mut self, id: T, args: T::Types) -> T
[src]
fn variant(&mut self, fields: T::Fields) -> T
[src]
fn poly_variant(&mut self, fields: T::Fields, rest: T) -> T
[src]
fn effect(&mut self, fields: T::Fields) -> T
[src]
fn poly_effect(&mut self, fields: T::Fields, rest: T) -> T
[src]
fn tuple<S: ?Sized, I>(&mut self, symbols: &mut S, elems: I) -> T where
S: IdentEnv<Ident = Id>,
I: IntoIterator<Item = T>,
[src]
S: IdentEnv<Ident = Id>,
I: IntoIterator<Item = T>,
fn tuple_<S: ?Sized, I>(&mut self, symbols: &mut S, elems: I) -> Type<Id, T> where
S: IdentEnv<Ident = Id>,
I: IntoIterator<Item = T>,
[src]
S: IdentEnv<Ident = Id>,
I: IntoIterator<Item = T>,
fn record(&mut self, types: T::TypeFields, fields: T::Fields) -> T
[src]
fn poly_record(&mut self, types: T::TypeFields, fields: T::Fields, rest: T) -> T
[src]
fn extend_full_row(
&mut self,
types: T::TypeFields,
fields: T::Fields,
rest: T
) -> T
[src]
&mut self,
types: T::TypeFields,
fields: T::Fields,
rest: T
) -> T
fn extend_row(&mut self, fields: T::Fields, rest: T) -> T
[src]
fn extend_type_row(&mut self, types: T::TypeFields, rest: T) -> T
[src]
fn empty_row(&mut self) -> T
[src]
fn function<I>(&mut self, args: I, ret: T) -> T where
I: IntoIterator<Item = T>,
I::IntoIter: DoubleEndedIterator<Item = T>,
[src]
I: IntoIterator<Item = T>,
I::IntoIter: DoubleEndedIterator<Item = T>,
fn function_implicit<I>(&mut self, args: I, ret: T) -> T where
I: IntoIterator<Item = T>,
I::IntoIter: DoubleEndedIterator<Item = T>,
[src]
I: IntoIterator<Item = T>,
I::IntoIter: DoubleEndedIterator<Item = T>,
fn function_type<I>(&mut self, arg_type: ArgType, args: I, ret: T) -> T where
I: IntoIterator<Item = T>,
I::IntoIter: DoubleEndedIterator<Item = T>,
[src]
I: IntoIterator<Item = T>,
I::IntoIter: DoubleEndedIterator<Item = T>,
fn generic(&mut self, typ: Generic<Id>) -> T
[src]
fn skolem(&mut self, typ: Skolem<Id>) -> T
[src]
fn variable(&mut self, typ: TypeVariable) -> T
[src]
fn alias(&mut self, name: Id, args: T::Generics, typ: T) -> T
[src]
fn ident(&mut self, id: KindedIdent<Id>) -> T
[src]
fn projection(&mut self, id: AppVec<Id>) -> T
[src]
fn function_builtin(&mut self) -> T
[src]
fn string(&mut self) -> T
[src]
fn char(&mut self) -> T
[src]
fn byte(&mut self) -> T
[src]
fn int(&mut self) -> T
[src]
fn float(&mut self) -> T
[src]
fn unit(&mut self) -> T
[src]
fn builtin_type(&mut self, typ: BuiltinType) -> T
[src]
fn new_alias(&mut self, name: Id, args: T::Generics, typ: T) -> Alias<Id, T>
[src]
fn new_data_alias(&mut self, data: AliasData<Id, T>) -> Alias<Id, T>
[src]
fn alias_group(&mut self, group: Vec<AliasData<Id, T>>) -> Vec<Alias<Id, T>> where
T: TypeExt<Id = Id>,
Id: PartialEq,
[src]
T: TypeExt<Id = Id>,
Id: PartialEq,
impl<'ast, Id> TypePtr for AstType<'ast, Id>
[src]
type Id = Id
type Types = &'ast mut [AstType<'ast, Id>]
type Generics = &'ast mut [Generic<Id>]
type Fields = &'ast mut [Field<Id, Self>]
type TypeFields = &'ast mut [Field<Id, Alias<Id, Self>>]
fn flags(&self) -> Flags
[src]
fn spine(&self) -> &Self
[src]
Auto Trait Implementations
impl<'ast, Id> Unpin for AstType<'ast, Id>
impl<'ast, Id> !UnwindSafe for AstType<'ast, Id>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
[src]
T: Any,
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> 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>,