pub struct EffectSet {
pub concrete: BTreeSet<EffectKind>,
pub var: Option<u32>,
}Fields§
§concrete: BTreeSet<EffectKind>§var: Option<u32>Implementations§
Source§impl EffectSet
impl EffectSet
pub fn empty() -> Self
Sourcepub fn singleton(s: impl Into<String>) -> Self
pub fn singleton(s: impl Into<String>) -> Self
Backwards-compatible constructor — produces a bare [name]
effect. New code that wants parameterized effects builds an
EffectKind directly and inserts it into concrete, or uses
EffectSet::singleton_arg.
Sourcepub fn singleton_arg(name: impl Into<String>, arg: impl Into<String>) -> Self
pub fn singleton_arg(name: impl Into<String>, arg: impl Into<String>) -> Self
Parameterized singleton, e.g. [net("wttr.in")].
Sourcepub fn open_var(id: u32) -> Self
pub fn open_var(id: u32) -> Self
An open effect set: just a row variable, no concrete lower bound. Used by stdlib HOF signatures (list.map, list.filter, list.fold, option.map, result.map, result.and_then).
pub fn union(&self, other: &EffectSet) -> EffectSet
Sourcepub fn is_subset(&self, other: &EffectSet) -> bool
pub fn is_subset(&self, other: &EffectSet) -> bool
self is a subset of other iff every entry in self is
subsumed by some entry in other. Per #207 this honors
bare-wildcard absorption: {[mcp(ocpp)]} ⊆ {[mcp]} holds.
pub fn extend(&mut self, other: &EffectSet)
pub fn is_open(&self) -> bool
Trait Implementations§
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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.