pub enum Effect {
Read,
ReversibleWrite,
IrreversibleWrite,
}Expand description
Whether an operation observes the world or changes it, and whether the change can be taken back.
ADR 0001 asks each operation to say which of the three it is. The
distinction is about the world outside the run, not about the host’s own
bookkeeping: waiting is a Effect::Read because nothing outside the run
is different afterwards.
Variants§
Read
Observes state without changing it.
ReversibleWrite
Changes state in a way the same host can put back.
IrreversibleWrite
Changes state nothing can put back, such as bytes already on a terminal or a message already sent.
Trait Implementations§
impl Copy for Effect
impl Eq for Effect
impl StructuralPartialEq for Effect
Auto Trait Implementations§
impl Freeze for Effect
impl RefUnwindSafe for Effect
impl Send for Effect
impl Sync for Effect
impl Unpin for Effect
impl UnsafeUnpin for Effect
impl UnwindSafe for Effect
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.