Skip to main content

Apply

Trait Apply 

Source
pub trait Apply<E> {
    // Required method
    fn apply(&mut self, effect: E);
}
Expand description

Framework hook to apply one effect during crate::Step.

Authors can apply PushToStack effects to their program inside authored Steps. The framework does not impose effect handling. Implementations are extension plumbing for storage/effects, not required component boilerplate.

Stack output implementations use direct typed insertion. This trait neither executes instructions nor supplies a Step or observer callbacks. The caller handles crate::Effects in order, applying each effect after execution. Applied values are not rolled back if later work fails. Custom fallible effect handling remains in Step; stack insertion follows PushStack’s ordinary allocation behavior.

Required Methods§

Source

fn apply(&mut self, effect: E)

Apply a single effect to this destination.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<D, T: StackValue, const N: usize> Apply<PushToStack<[T; N]>> for D
where D: PushStack<T::Storage>,

Source§

impl<D> Apply<PushToStack<()>> for D

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue, E: StackValue, F: StackValue, G: StackValue, H: StackValue, I: StackValue, J: StackValue, K: StackValue, L: StackValue, M: StackValue, N: StackValue, O: StackValue, P: StackValue> Apply<PushToStack<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)>> for Destination

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue, E: StackValue, F: StackValue, G: StackValue, H: StackValue, I: StackValue, J: StackValue, K: StackValue, L: StackValue, M: StackValue, N: StackValue, O: StackValue> Apply<PushToStack<(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)>> for Destination

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue, E: StackValue, F: StackValue, G: StackValue, H: StackValue, I: StackValue, J: StackValue, K: StackValue, L: StackValue, M: StackValue, N: StackValue> Apply<PushToStack<(A, B, C, D, E, F, G, H, I, J, K, L, M, N)>> for Destination

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue, E: StackValue, F: StackValue, G: StackValue, H: StackValue, I: StackValue, J: StackValue, K: StackValue, L: StackValue, M: StackValue> Apply<PushToStack<(A, B, C, D, E, F, G, H, I, J, K, L, M)>> for Destination

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue, E: StackValue, F: StackValue, G: StackValue, H: StackValue, I: StackValue, J: StackValue, K: StackValue, L: StackValue> Apply<PushToStack<(A, B, C, D, E, F, G, H, I, J, K, L)>> for Destination

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue, E: StackValue, F: StackValue, G: StackValue, H: StackValue, I: StackValue, J: StackValue, K: StackValue> Apply<PushToStack<(A, B, C, D, E, F, G, H, I, J, K)>> for Destination

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue, E: StackValue, F: StackValue, G: StackValue, H: StackValue, I: StackValue, J: StackValue> Apply<PushToStack<(A, B, C, D, E, F, G, H, I, J)>> for Destination

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue, E: StackValue, F: StackValue, G: StackValue, H: StackValue, I: StackValue> Apply<PushToStack<(A, B, C, D, E, F, G, H, I)>> for Destination

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue, E: StackValue, F: StackValue, G: StackValue, H: StackValue> Apply<PushToStack<(A, B, C, D, E, F, G, H)>> for Destination

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue, E: StackValue, F: StackValue, G: StackValue> Apply<PushToStack<(A, B, C, D, E, F, G)>> for Destination

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue, E: StackValue, F: StackValue> Apply<PushToStack<(A, B, C, D, E, F)>> for Destination
where Destination: PushStack<A::Storage> + PushStack<B::Storage> + PushStack<C::Storage> + PushStack<D::Storage> + PushStack<E::Storage> + PushStack<F::Storage> + Sized,

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue, E: StackValue> Apply<PushToStack<(A, B, C, D, E)>> for Destination
where Destination: PushStack<A::Storage> + PushStack<B::Storage> + PushStack<C::Storage> + PushStack<D::Storage> + PushStack<E::Storage> + Sized,

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue, D: StackValue> Apply<PushToStack<(A, B, C, D)>> for Destination
where Destination: PushStack<A::Storage> + PushStack<B::Storage> + PushStack<C::Storage> + PushStack<D::Storage> + Sized,

Source§

impl<Destination, A: StackValue, B: StackValue, C: StackValue> Apply<PushToStack<(A, B, C)>> for Destination
where Destination: PushStack<A::Storage> + PushStack<B::Storage> + PushStack<C::Storage> + Sized,

Source§

impl<Destination, A: StackValue, B: StackValue> Apply<PushToStack<(A, B)>> for Destination
where Destination: PushStack<A::Storage> + PushStack<B::Storage> + Sized,

Source§

impl<Destination, A: StackValue> Apply<PushToStack<(A,)>> for Destination
where Destination: PushStack<A::Storage> + Sized,