fedimint_client::sm::util

Trait MapStateTransitions

Source
pub trait MapStateTransitions {
    type State: MaybeSend + MaybeSync + 'static;

    // Required method
    fn map<D, W, U>(self, wrap: W, unwrap: U) -> Vec<StateTransition<D>>
       where D: MaybeSend + MaybeSync + 'static,
             W: Fn(Self::State) -> D + Clone + MaybeSend + MaybeSync + 'static,
             U: Fn(D) -> Self::State + Clone + MaybeSend + MaybeSync + 'static;
}

Required Associated Types§

Source

type State: MaybeSend + MaybeSync + 'static

Required Methods§

Source

fn map<D, W, U>(self, wrap: W, unwrap: U) -> Vec<StateTransition<D>>
where D: MaybeSend + MaybeSync + 'static, W: Fn(Self::State) -> D + Clone + MaybeSend + MaybeSync + 'static, U: Fn(D) -> Self::State + Clone + MaybeSend + MaybeSync + 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<S> MapStateTransitions for Vec<StateTransition<S>>
where S: MaybeSend + MaybeSync + 'static,

Source§

type State = S

Source§

fn map<D, W, U>(self, wrap: W, unwrap: U) -> Vec<StateTransition<D>>
where D: MaybeSend + MaybeSync + 'static, W: Fn(Self::State) -> D + Clone + MaybeSend + MaybeSync + 'static, U: Fn(D) -> Self::State + Clone + MaybeSend + MaybeSync + 'static,

Implementors§