[][src]Struct gluon_base::types::Alias

pub struct Alias<Id, T> { /* fields omitted */ }

An alias is wrapper around Type::Alias, allowing it to be cheaply converted to a type and dereferenced to AliasRef

Methods

impl<Id, T> Alias<Id, T> where
    T: From<Type<Id, T>>, 
[src]

pub fn new(name: Id, args: Vec<Generic<Id>>, typ: T) -> Alias<Id, T>[src]

pub fn group(group: Vec<AliasData<Id, T>>) -> Vec<Alias<Id, T>>[src]

impl<Id, T> Alias<Id, T>[src]

pub fn as_type(&self) -> &T[src]

pub fn into_type(self) -> T[src]

impl<Id, T> Alias<Id, T> where
    T: TypeExt<Id = Id> + Clone,
    Id: Clone + PartialEq
[src]

pub fn typ(
    &self,
    interner: &mut impl TypeContext<Id, T>
) -> Cow<T>
[src]

Returns the actual type of the alias

pub fn unpack_canonical_alias<'b>(
    &'b self,
    canonical_alias_type: &'b T,
    un_alias: impl FnMut(&'b AliasRef<Id, T>) -> Cow<'b, T>
) -> (Cow<'b, [Generic<Id>]>, &'b AliasRef<Id, T>, Cow<'b, T>)
[src]

Methods from Deref<Target = AliasRef<Id, T>>

pub fn try_get_alias_mut(&mut self) -> Option<&mut AliasData<Id, T>>[src]

pub fn typ(
    &self,
    interner: &mut impl TypeContext<Id, T>
) -> Cow<T>
[src]

Trait Implementations

impl<Id: PartialEq, T: PartialEq> PartialEq<Alias<Id, T>> for Alias<Id, T>[src]

impl<Id, T> AsRef<T> for Alias<Id, T>[src]

impl<Id: Clone, T: Clone> Clone for Alias<Id, T>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<Id, T> From<AliasData<Id, T>> for Alias<Id, T> where
    T: From<Type<Id, T>>, 
[src]

impl<Id, T> From<AliasRef<Id, T>> for Alias<Id, T> where
    T: From<Type<Id, T>>, 
[src]

impl<Id: Eq, T: Eq> Eq for Alias<Id, T>[src]

impl<Id: Debug, T: Debug> Debug for Alias<Id, T>[src]

impl<Id, T> DerefMut for Alias<Id, T> where
    T: DerefMut<Target = Type<Id, T>>, 
[src]

impl<Id: Hash, T: Hash> Hash for Alias<Id, T>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<Id, T> Deref for Alias<Id, T> where
    T: Deref<Target = Type<Id, T>>, 
[src]

type Target = AliasRef<Id, T>

The resulting type after dereferencing.

impl<Id, T> SerializeState<SeSeed> for Alias<Id, T> where
    T: SerializeState<SeSeed>, 
[src]

impl<'de, Id, T> DeserializeState<'de, Seed<Id, T>> for Alias<Id, T> where
    T: DeserializeState<'de, Seed<Id, T>> + Clone + From<Type<Id, T>> + Any,
    Id: DeserializeState<'de, Seed<Id, T>> + Clone + Any
[src]

Auto Trait Implementations

impl<Id, T> Send for Alias<Id, T> where
    Id: Send,
    T: Send

impl<Id, T> Sync for Alias<Id, T> where
    Id: Sync,
    T: Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> CloneAny for T where
    T: Clone + Any
[src]