pub enum EffectScheme {
Concrete(EffectSet),
Variable(EffectVar),
Union(Box<EffectScheme>, Box<EffectScheme>),
}Expand description
Effect scheme for effect polymorphism (analogous to type schemes)
Variants§
Concrete(EffectSet)
Concrete effect set
Variable(EffectVar)
Effect variable (for polymorphism)
Union(Box<EffectScheme>, Box<EffectScheme>)
Union of effect schemes
Implementations§
Source§impl EffectScheme
impl EffectScheme
Sourcepub fn union(e1: EffectScheme, e2: EffectScheme) -> Self
pub fn union(e1: EffectScheme, e2: EffectScheme) -> Self
Create a union of two effect schemes
Sourcepub fn substitute(&self, subst: &EffectSubstitution) -> EffectScheme
pub fn substitute(&self, subst: &EffectSubstitution) -> EffectScheme
Substitute effect variables with concrete effect sets
Trait Implementations§
Source§impl Clone for EffectScheme
impl Clone for EffectScheme
Source§fn clone(&self) -> EffectScheme
fn clone(&self) -> EffectScheme
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EffectScheme
impl Debug for EffectScheme
Source§impl<'de> Deserialize<'de> for EffectScheme
impl<'de> Deserialize<'de> for EffectScheme
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for EffectScheme
impl Display for EffectScheme
Source§impl PartialEq for EffectScheme
impl PartialEq for EffectScheme
Source§impl Serialize for EffectScheme
impl Serialize for EffectScheme
impl Eq for EffectScheme
impl StructuralPartialEq for EffectScheme
Auto Trait Implementations§
impl Freeze for EffectScheme
impl RefUnwindSafe for EffectScheme
impl Send for EffectScheme
impl Sync for EffectScheme
impl Unpin for EffectScheme
impl UnwindSafe for EffectScheme
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