[][src]Struct gluon_base::ast::AstType

pub struct AstType<'ast, Id> { /* fields omitted */ }

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]

pub fn new_no_loc(
    arena: ArenaRef<'_, 'ast, Id>,
    typ: Type<Id, AstType<'ast, Id>>
) -> Self
[src]

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]

pub fn set_metadata<T>(&mut self, metadata: T) where
    T: Into<BaseMetadata<'ast>>, 
[src]

pub fn remove_single_forall(&mut self) -> &mut AstType<'ast, Id>[src]

pub fn span_mut(&mut self) -> &mut Span<BytePos>[src]

Methods from Deref<Target = Type<Id, AstType<'ast, 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> AsMut<Spanned<Type<Id, AstType<'ast, Id>>, ByteIndex>> for AstType<'ast, Id>[src]

impl<'ast, Id> AstAlloc<'ast, Id> for AstType<'ast, Id>[src]

impl<'ast, Id> AstClone<'ast, Id> for AstType<'ast, Id> where
    Id: AstClone<'ast, Id>,
    Id: Clone
[src]

impl<Id: Debug, '_> Debug for AstType<'_, Id>[src]

impl<'ast, Id> Deref for AstType<'ast, Id>[src]

type Target = Type<Id, AstType<'ast, Id>>

The resulting type after dereferencing.

impl<'ast, Id> DerefMut for AstType<'ast, Id>[src]

impl<Id: AsRef<str> + AsId<Id>, '_> 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]

impl<'ast, Id> RefUnwindSafe for AstType<'ast, Id> where
    Id: RefUnwindSafe
[src]

impl<'ast, Id> Send for AstType<'ast, Id> where
    Id: Send
[src]

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]

impl<'ast, Id, '_> TypeContext<Id, AstType<'ast, Id>> for ArenaRef<'_, 'ast, Id>[src]

impl<'ast, Id> TypePtr for AstType<'ast, Id>[src]

type Id = Id

type SpannedId = Spanned<Id, BytePos>

type Types = &'ast mut [AstType<'ast, Id>]

type Generics = &'ast mut [Generic<Id>]

type Fields = &'ast mut [Field<Self::SpannedId, Self>]

type TypeFields = &'ast mut [Field<Self::SpannedId, Alias<Id, Self>>]

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]

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> 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.