pub struct EffectSet { /* private fields */ }Expand description
Set of effects for an expression or operation.
Implementations§
Source§impl EffectSet
impl EffectSet
Sourcepub fn differentiable() -> Self
pub fn differentiable() -> Self
Create a differentiable effect set
Sourcepub fn stochastic() -> Self
pub fn stochastic() -> Self
Create a stochastic effect set
Sourcepub fn with_all(self, effects: impl IntoIterator<Item = Effect>) -> Self
pub fn with_all(self, effects: impl IntoIterator<Item = Effect>) -> Self
Add multiple effects
Sourcepub fn is_pure(&self) -> bool
pub fn is_pure(&self) -> bool
Check if this effect set is pure (contains Pure computational effect and no impure effects)
Sourcepub fn is_differentiable(&self) -> bool
pub fn is_differentiable(&self) -> bool
Check if this effect set is differentiable
Sourcepub fn is_stochastic(&self) -> bool
pub fn is_stochastic(&self) -> bool
Check if this effect set is stochastic
Sourcepub fn intersection(&self, other: &EffectSet) -> EffectSet
pub fn intersection(&self, other: &EffectSet) -> EffectSet
Intersection of two effect sets
Sourcepub fn is_subset_of(&self, other: &EffectSet) -> bool
pub fn is_subset_of(&self, other: &EffectSet) -> bool
Check if this effect set is a subset of another (subtyping)
Sourcepub fn is_compatible_with(&self, other: &EffectSet) -> bool
pub fn is_compatible_with(&self, other: &EffectSet) -> bool
Check if two effect sets are compatible
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EffectSet
impl<'de> Deserialize<'de> for EffectSet
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
impl Eq for EffectSet
impl StructuralPartialEq for EffectSet
Auto Trait Implementations§
impl Freeze for EffectSet
impl RefUnwindSafe for EffectSet
impl Send for EffectSet
impl Sync for EffectSet
impl Unpin for EffectSet
impl UnwindSafe for EffectSet
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