[][src]Trait gluon_check::substitution::Substitutable

pub trait Substitutable: Sized {
    type Variable: Variable;
    type Factory: VariableFactory<Variable = Self::Variable>;
    type Interner: Default;
    fn from_variable(subs: &Substitution<Self>, x: Self::Variable) -> Self;
fn into_variable(&mut self, x: Self::Variable);
fn is_unique(self_: &Self) -> bool;
fn get_var(&self) -> Option<&Self::Variable>;
fn traverse<'a, F>(&'a self, f: &mut F)
    where
        F: Walker<'a, Self>
;
fn instantiate(&self, subs: &Substitution<Self>) -> Self; fn get_id(&self) -> Option<u32> { ... }
fn contains_variables(&self) -> bool { ... } }

Trait implemented on types which may contain substitutable variables

Associated Types

Loading content...

Required methods

fn from_variable(subs: &Substitution<Self>, x: Self::Variable) -> Self

Constructs a new object from its variable type

fn into_variable(&mut self, x: Self::Variable)

fn is_unique(self_: &Self) -> bool

fn get_var(&self) -> Option<&Self::Variable>

Retrieves the variable if self is a variable otherwise returns None

fn traverse<'a, F>(&'a self, f: &mut F) where
    F: Walker<'a, Self>, 

fn instantiate(&self, subs: &Substitution<Self>) -> Self

Loading content...

Provided methods

fn get_id(&self) -> Option<u32>

fn contains_variables(&self) -> bool

Loading content...

Implementations on Foreign Types

impl Substitutable for ArcKind[src]

type Variable = u32

type Factory = ()

type Interner = NullInterner

impl Substitutable for RcType<Symbol>[src]

type Variable = TypeVariable

type Factory = ArcKind

type Interner = SharedInterner<Symbol, Self>

Loading content...

Implementors

Loading content...