[−][src]Struct gluon_base::types::Alias
An alias is wrapper around Type::Alias
, allowing it to be cheaply converted to a type and
dereferenced to AliasRef
Implementations
impl<Id, T> Alias<Id, T> where
T: TypePtr<Id = Id>,
[src]
T: TypePtr<Id = Id>,
pub fn new_with(
context: &mut impl TypeContext<Id, T> + ?Sized,
name: Id,
args: T::Generics,
typ: T
) -> Self
[src]
context: &mut impl TypeContext<Id, T> + ?Sized,
name: Id,
args: T::Generics,
typ: T
) -> Self
impl<Id, T> Alias<Id, T> where
T: TypeExt<Id = Id> + From<Type<Id, T>>,
T::Types: Clone + Default + Extend<T>,
[src]
T: TypeExt<Id = Id> + From<Type<Id, T>>,
T::Types: Clone + Default + Extend<T>,
pub fn new(name: Id, args: T::Generics, 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]
impl<Id, T> Alias<Id, T> where
T: TypeExt<Id = Id> + Clone,
T::Types: Clone + Default + Extend<T>,
T::Generics: Clone,
T::Fields: Clone,
Id: Clone + PartialEq,
[src]
T: TypeExt<Id = Id> + Clone,
T::Types: Clone + Default + Extend<T>,
T::Generics: Clone,
T::Fields: Clone,
Id: Clone + PartialEq,
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]
&'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>>
[src]
pub fn typ(&self, interner: &mut impl TypeContext<Id, T>) -> Cow<T>
[src]
Trait Implementations
impl<Id, T> AsRef<T> for Alias<Id, T>
[src]
impl<'ast, Id, T> AstClone<'ast, Id> for Alias<Id, T> where
Id: AstClone<'ast, Id>,
T: AstClone<'ast, Id>,
Id: Clone,
[src]
Id: AstClone<'ast, Id>,
T: AstClone<'ast, Id>,
Id: Clone,
impl<Id: Clone, T: Clone> Clone for Alias<Id, T>
[src]
impl<Id: Debug, T: Debug> Debug for Alias<Id, T>
[src]
impl<Id, T> Deref for Alias<Id, T> where
T: TypePtr<Id = Id>,
[src]
T: TypePtr<Id = Id>,
type Target = AliasRef<Id, T>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<Id, T> DerefMut for Alias<Id, T> where
T: TypePtr<Id = Id> + DerefMut<Target = Type<Id, T>>,
[src]
T: TypePtr<Id = Id> + DerefMut<Target = Type<Id, T>>,
impl<Id: Eq, T: Eq> Eq for Alias<Id, T>
[src]
impl<Id, T> From<AliasData<Id, T>> for Alias<Id, T> where
T: TypeExt<Id = Id> + From<Type<Id, T>>,
T::Types: Clone + Default + Extend<T>,
[src]
T: TypeExt<Id = Id> + From<Type<Id, T>>,
T::Types: Clone + Default + Extend<T>,
impl<Id, T> From<AliasRef<Id, T>> for Alias<Id, T> where
T: TypePtr<Id = Id> + From<Type<Id, T>>,
[src]
T: TypePtr<Id = Id> + From<Type<Id, T>>,
impl<Id: Hash, T: Hash> Hash for Alias<Id, T>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<Id: PartialEq, T: PartialEq> PartialEq<Alias<Id, T>> for Alias<Id, T>
[src]
impl<Id, T> StructuralEq for Alias<Id, T>
[src]
impl<Id, T> StructuralPartialEq for Alias<Id, T>
[src]
Auto Trait Implementations
impl<Id, T> RefUnwindSafe for Alias<Id, T> where
Id: RefUnwindSafe,
T: RefUnwindSafe,
Id: RefUnwindSafe,
T: RefUnwindSafe,
impl<Id, T> Send for Alias<Id, T> where
Id: Send,
T: Send,
Id: Send,
T: Send,
impl<Id, T> Sync for Alias<Id, T> where
Id: Sync,
T: Sync,
Id: Sync,
T: Sync,
impl<Id, T> Unpin for Alias<Id, T> where
Id: Unpin,
T: Unpin,
Id: Unpin,
T: Unpin,
impl<Id, T> UnwindSafe for Alias<Id, T> where
Id: UnwindSafe,
T: UnwindSafe,
Id: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,