Trait gluon_base::types::TypePtr
source · pub trait TypePtr: Deref<Target = Type<Self::Id, Self>> + Sized {
type Id;
type SpannedId;
type Types: TypeAlloc<Self> + Deref<Target = [Self]> + Default;
type Generics: TypeAlloc<Self> + Deref<Target = [Generic<Self::Id>]> + Default;
type Fields: TypeAlloc<Self> + Deref<Target = [Field<Self::SpannedId, Self>]> + Default;
type TypeFields: TypeAlloc<Self> + Deref<Target = [Field<Self::SpannedId, Alias<Self::Id, Self>>]> + Default;
// Provided methods
fn flags(&self) -> Flags { ... }
fn spine(&self) -> &Self { ... }
fn display<A>(&self, width: usize) -> TypeFormatter<'_, Self::Id, Self, A>
where Self::Id: AsRef<str>,
Self::SpannedId: AsRef<str> { ... }
}
Required Associated Types§
type Id
type SpannedId
type Types: TypeAlloc<Self> + Deref<Target = [Self]> + Default
type Generics: TypeAlloc<Self> + Deref<Target = [Generic<Self::Id>]> + Default
type Fields: TypeAlloc<Self> + Deref<Target = [Field<Self::SpannedId, Self>]> + Default
type TypeFields: TypeAlloc<Self> + Deref<Target = [Field<Self::SpannedId, Alias<Self::Id, Self>>]> + Default
Provided Methods§
fn flags(&self) -> Flags
fn spine(&self) -> &Self
fn display<A>(&self, width: usize) -> TypeFormatter<'_, Self::Id, Self, A>
Object Safety§
This trait is not object safe.