Skip to main content

Effect

Struct Effect 

Source
pub struct Effect<S, A: Address = MailAddr> { /* private fields */ }
Expand description

Effects emitted by one ordinary infallible, no-birth behavior turn.

Effect is a truthful shorthand for Actions<A, Never, Vec<S>, NoBirths>. It introduces no runtime operation, hidden error path, creation capability, or phase transition. Behaviors that need any of those capabilities use the complete Actions algebra.

Implementations§

Source§

impl<S, A: Address> Effect<S, A>

Source

pub fn none() -> Self

Continue after emitting no sends.

Source

pub fn send(send: S) -> Self

Continue after emitting one send value.

Source

pub fn send_all(sends: impl IntoIterator<Item = S>) -> Self

Continue after emitting the supplied send values in order.

Source

pub fn stop(self) -> Self

Stop normally after preserving this turn’s sends.

Trait Implementations§

Source§

impl<S, A: Address> From<Effect<S, A>> for Actions<A, Never, Vec<S>, NoBirths>

Source§

fn from(effect: Effect<S, A>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<S, A> Freeze for Effect<S, A>
where Actions<A, Never, Vec<S>, NoBirths>: Freeze,

§

impl<S, A> RefUnwindSafe for Effect<S, A>

§

impl<S, A> Send for Effect<S, A>
where Actions<A, Never, Vec<S>, NoBirths>: Send,

§

impl<S, A> Sync for Effect<S, A>
where Actions<A, Never, Vec<S>, NoBirths>: Sync,

§

impl<S, A> Unpin for Effect<S, A>
where Actions<A, Never, Vec<S>, NoBirths>: Unpin,

§

impl<S, A> UnsafeUnpin for Effect<S, A>

§

impl<S, A> UnwindSafe for Effect<S, A>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.