Struct gluon_base::types::Interner

source ·
pub struct Interner<Id, T>
where T: TypeExt<Id = Id>, T::Types: Default + Extend<T> + FromIterator<T>,
{ /* private fields */ }

Trait Implementations§

source§

impl<Id, T> Default for Interner<Id, T>
where T: Default + TypeExt<Id = Id> + From<Type<Id, T>> + Clone, T::Target: Eq + Hash, T::Types: Default + Extend<T> + FromIterator<T>,

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<Id, T> TypeContext<Id, T> for Interner<Id, T>
where T: TypeContextAlloc<Id = Id> + TypeExt<Id = Id> + Eq + Hash + Clone, T::Types: FromIterator<T>, T::Generics: FromIterator<Generic<Id>>, T::TypeFields: FromIterator<Field<T::SpannedId, Alias<Id, T>>>, T::SpannedId: Eq + Hash, Id: Eq + Hash,

source§

fn intern(&mut self, typ: Type<Id, T>) -> T

source§

fn intern_types(&mut self, types: impl IntoIterator<Item = T>) -> T::Types

source§

fn intern_generics( &mut self, types: impl IntoIterator<Item = Generic<Id>> ) -> T::Generics

source§

fn intern_fields( &mut self, types: impl IntoIterator<Item = Field<T::SpannedId, T>> ) -> T::Fields

source§

fn intern_type_fields( &mut self, types: impl IntoIterator<Item = Field<T::SpannedId, Alias<Id, T>>> ) -> T::TypeFields

source§

fn intern_flags(&mut self, typ: Type<Id, T>, flags: Flags) -> T

source§

fn hole(&mut self) -> T

source§

fn opaque(&mut self) -> T

source§

fn error(&mut self) -> T

source§

fn int(&mut self) -> T

source§

fn byte(&mut self) -> T

source§

fn float(&mut self) -> T

source§

fn string(&mut self) -> T

source§

fn char(&mut self) -> T

source§

fn function_builtin(&mut self) -> T

source§

fn array_builtin(&mut self) -> T

source§

fn unit(&mut self) -> T

source§

fn empty_row(&mut self) -> T

source§

fn builtin(&mut self, typ: BuiltinType) -> T

source§

fn forall(&mut self, params: T::Generics, typ: T) -> T

source§

fn array(&mut self, typ: T) -> T

source§

fn app(&mut self, id: T, args: T::Types) -> T

source§

fn variant(&mut self, fields: T::Fields) -> T

source§

fn poly_variant(&mut self, fields: T::Fields, rest: T) -> T

source§

fn effect(&mut self, fields: T::Fields) -> T

source§

fn poly_effect(&mut self, fields: T::Fields, rest: T) -> T

source§

fn record(&mut self, types: T::TypeFields, fields: T::Fields) -> T

source§

fn poly_record(&mut self, types: T::TypeFields, fields: T::Fields, rest: T) -> T

source§

fn extend_full_row( &mut self, types: T::TypeFields, fields: T::Fields, rest: T ) -> T

source§

fn extend_row(&mut self, fields: T::Fields, rest: T) -> T

source§

fn extend_type_row(&mut self, types: T::TypeFields, rest: T) -> T

source§

fn function<I>(&mut self, args: I, ret: T) -> T
where I: IntoIterator<Item = T>, I::IntoIter: DoubleEndedIterator<Item = T>,

source§

fn function_implicit<I>(&mut self, args: I, ret: T) -> T
where I: IntoIterator<Item = T>, I::IntoIter: DoubleEndedIterator<Item = T>,

source§

fn function_type<I>(&mut self, arg_type: ArgType, args: I, ret: T) -> T
where I: IntoIterator<Item = T>, I::IntoIter: DoubleEndedIterator<Item = T>,

source§

fn generic(&mut self, typ: Generic<Id>) -> T

source§

fn skolem(&mut self, typ: Skolem<Id>) -> T

source§

fn variable(&mut self, typ: TypeVariable) -> T

source§

fn alias(&mut self, name: Id, args: T::Generics, typ: T) -> T

source§

fn ident(&mut self, id: KindedIdent<Id>) -> T

source§

fn projection(&mut self, id: AppVec<Id>) -> T

source§

fn builtin_type(&mut self, typ: BuiltinType) -> T

source§

fn new_alias(&mut self, name: Id, args: T::Generics, typ: T) -> Alias<Id, T>

source§

fn new_data_alias(&mut self, data: AliasData<Id, T>) -> Alias<Id, T>

source§

fn alias_group(&mut self, group: Vec<AliasData<Id, T>>) -> Vec<Alias<Id, T>>
where T: TypeExt<Id = Id>, Id: PartialEq,

Auto Trait Implementations§

§

impl<Id, T> RefUnwindSafe for Interner<Id, T>

§

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

§

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

§

impl<Id, T> Unpin for Interner<Id, T>
where Id: Unpin, T: Unpin,

§

impl<Id, T> UnwindSafe for Interner<Id, T>
where Id: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<Id> AsId<Id> for Id
where Id: ?Sized,

source§

fn as_id(&self) -> &Id

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Any for T
where T: Any,