Struct gluon_base::types::AliasRef
source · pub struct AliasRef<Id, T>where
T: TypePtr<Id = Id>,{
pub group: Arc<[AliasData<Id, T>]>,
/* private fields */
}
Expand description
Data for a type alias. Probably you want to use Alias
instead of this directly as Alias allows
for cheap conversion back into a type as well.
Fields§
§group: Arc<[AliasData<Id, T>]>
The other aliases defined in this group
Implementations§
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<'ast, Id, T> AstClone<'ast, Id> for AliasRef<Id, T>where
T: TypePtr<Id = Id> + AstClone<'ast, Id>,
Id: AstClone<'ast, Id> + Clone,
T::Generics: AstClone<'ast, Id>,
impl<'ast, Id, T> AstClone<'ast, Id> for AliasRef<Id, T>where T: TypePtr<Id = Id> + AstClone<'ast, Id>, Id: AstClone<'ast, Id> + Clone, T::Generics: AstClone<'ast, Id>,
source§impl<Id, T> Debug for AliasRef<Id, T>where
Id: Debug,
T: TypePtr<Id = Id> + Debug,
AliasData<Id, T>: Debug,
impl<Id, T> Debug for AliasRef<Id, T>where Id: Debug, T: TypePtr<Id = Id> + Debug, AliasData<Id, T>: Debug,
source§impl<Id, T> From<AliasRef<Id, T>> for Alias<Id, T>where
T: TypePtr<Id = Id> + From<Type<Id, T>>,
impl<Id, T> From<AliasRef<Id, T>> for Alias<Id, T>where T: TypePtr<Id = Id> + From<Type<Id, T>>,
source§impl<Id, T> PartialEq<AliasRef<Id, T>> for AliasRef<Id, T>where
T: TypePtr<Id = Id>,
AliasData<Id, T>: PartialEq,
impl<Id, T> PartialEq<AliasRef<Id, T>> for AliasRef<Id, T>where T: TypePtr<Id = Id>, AliasData<Id, T>: PartialEq,
impl<Id, T> Eq for AliasRef<Id, T>where T: TypePtr<Id = Id>, AliasData<Id, T>: Eq,
Auto Trait Implementations§
impl<Id, T> RefUnwindSafe for AliasRef<Id, T>where Id: RefUnwindSafe, T: RefUnwindSafe, <T as TypePtr>::Generics: RefUnwindSafe,
impl<Id, T> Send for AliasRef<Id, T>where Id: Send + Sync, T: Send + Sync, <T as TypePtr>::Generics: Send + Sync,
impl<Id, T> Sync for AliasRef<Id, T>where Id: Send + Sync, T: Send + Sync, <T as TypePtr>::Generics: Send + Sync,
impl<Id, T> Unpin for AliasRef<Id, T>
impl<Id, T> UnwindSafe for AliasRef<Id, T>where Id: RefUnwindSafe, T: RefUnwindSafe, <T as TypePtr>::Generics: RefUnwindSafe,
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