Struct gluon_base::types::Alias  
source · pub struct Alias<Id, T> { /* private fields */ }Expand description
An alias is wrapper around Type::Alias, allowing it to be cheaply converted to a type and
dereferenced to AliasRef
Implementations§
source§impl<Id, T> Alias<Id, T>where
    T: TypePtr<Id = Id>,
 
impl<Id, T> Alias<Id, T>where
    T: TypePtr<Id = Id>,
pub fn new_with( context: &mut (impl TypeContext<Id, T> + ?Sized), name: Id, args: T::Generics, typ: T ) -> Self
source§impl<Id, T> Alias<Id, T>
 
impl<Id, T> Alias<Id, T>
sourcepub fn typ(&self, interner: &mut impl TypeContext<Id, T>) -> Cow<'_, T>
 
pub fn typ(&self, interner: &mut impl TypeContext<Id, T>) -> Cow<'_, T>
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>)
Methods from Deref<Target = AliasRef<Id, T>>§
pub fn try_get_alias_mut(&mut self) -> Option<&mut AliasData<Id, T>>
pub fn typ(&self, interner: &mut impl TypeContext<Id, T>) -> Cow<'_, T>
Methods from Deref<Target = AliasData<Id, T>>§
sourcepub fn unresolved_type(&self) -> &T
 
pub fn unresolved_type(&self) -> &T
Returns the type aliased by self with out Type::Ident resolved to their actual
Type::Alias representation
pub fn is_implicit(&self) -> bool
pub fn self_type(&self, context: &mut (impl TypeContext<Id, T> + ?Sized)) -> T
pub fn params(&self) -> &[Generic<Id>]
pub fn aliased_type(&self) -> &T
pub fn kind<'k>(&'k self, cache: &'k KindCache) -> Cow<'k, ArcKind>
Trait Implementations§
source§impl<'de, Id, T> DeserializeState<'de, Seed<Id, T>> for Alias<Id, T>
 
impl<'de, Id, T> DeserializeState<'de, Seed<Id, T>> for Alias<Id, T>
source§fn deserialize_state<__D>(
    __seed: &mut Seed<Id, T>,
    __deserializer: __D
) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize_state<__D>(
    __seed: &mut Seed<Id, T>,
    __deserializer: __D
) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserializes 
Self using seed and the deserializersource§impl<Id: PartialEq, T: PartialEq> PartialEq for Alias<Id, T>
 
impl<Id: PartialEq, T: PartialEq> PartialEq for Alias<Id, T>
source§impl<Id, T> SerializeState<SeSeed> for Alias<Id, T>
 
impl<Id, T> SerializeState<SeSeed> for Alias<Id, T>
source§fn serialize_state<__S>(
    &self,
    __serializer: __S,
    __seed: &SeSeed
) -> Result<__S::Ok, __S::Error>where
    __S: Serializer,
 
fn serialize_state<__S>(
    &self,
    __serializer: __S,
    __seed: &SeSeed
) -> Result<__S::Ok, __S::Error>where
    __S: Serializer,
Serializes 
selfimpl<Id: Eq, T: Eq> Eq for Alias<Id, T>
impl<Id, T> StructuralEq for Alias<Id, T>
impl<Id, T> StructuralPartialEq for Alias<Id, T>
Auto Trait Implementations§
impl<Id, T> RefUnwindSafe for Alias<Id, T>where
    Id: RefUnwindSafe,
    T: RefUnwindSafe,
impl<Id, T> Send for Alias<Id, T>
impl<Id, T> Sync for Alias<Id, T>
impl<Id, T> Unpin for Alias<Id, T>
impl<Id, T> UnwindSafe for Alias<Id, T>where
    Id: UnwindSafe,
    T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more