pub struct EffectSet {
pub reads: HashSet<Symbol>,
pub writes: HashSet<Symbol>,
pub allocates: bool,
pub io: bool,
pub security_check: bool,
pub diverges: bool,
pub unknown: bool,
pub nondet: bool,
pub concurrent: bool,
}Expand description
Effect classification for expressions, statements, and functions.
Effects form a lattice: Pure ⊂ Read ⊂ Write ⊂ IO ⊂ Unknown. Each EffectSet tracks the precise set of variables read/written, plus boolean flags for allocation, IO, security checks, divergence, and unknown (escape blocks).
Fields§
§reads: HashSet<Symbol>§writes: HashSet<Symbol>§allocates: bool§io: bool§security_check: bool§diverges: bool§unknown: bool§nondet: boolNondeterministic choice — Select, Try* (depends on instantaneous buffer
state), and cooperative StopTask. The outcome is not a function of the inputs,
so a function carrying one must never be specialized on a static argument.
concurrent: boolSpawns or communicates across a concurrency boundary — LaunchTask, CreatePipe,
Spawn, and the networking statements. Opaque to the partial evaluator.
Implementations§
Source§impl EffectSet
impl EffectSet
Trait Implementations§
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.