Skip to main content

DagChainFork

Struct DagChainFork 

Source
pub struct DagChainFork<E, ForkOut, Chain, Arms> { /* private fields */ }
Expand description

Fork builder on the main chain. Accumulates arms as a tuple.

Implementations§

Source§

impl<E, ForkOut, Chain> DagChainFork<E, ForkOut, Chain, ()>

Source

pub fn arm<AOut, ACh>( self, f: impl FnOnce(DagArmSeed<ForkOut>) -> DagArm<ForkOut, AOut, ACh>, ) -> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, AOut, ACh>,)>

Add the first arm to this fork.

Source§

impl<E, ForkOut, Chain, A0, C0> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, A0, C0>,)>

Source

pub fn arm<AOut, ACh>( self, f: impl FnOnce(DagArmSeed<ForkOut>) -> DagArm<ForkOut, AOut, ACh>, ) -> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, A0, C0>, DagArm<ForkOut, AOut, ACh>)>

Add a second arm to this fork.

Source§

impl<E, ForkOut, Chain, A0, C0, A1, C1> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, A0, C0>, DagArm<ForkOut, A1, C1>)>

Source

pub fn arm<AOut, ACh>( self, f: impl FnOnce(DagArmSeed<ForkOut>) -> DagArm<ForkOut, AOut, ACh>, ) -> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, A0, C0>, DagArm<ForkOut, A1, C1>, DagArm<ForkOut, AOut, ACh>)>

Add a third arm to this fork.

Source§

impl<E, ForkOut, Chain, A0, C0, A1, C1, A2, C2> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, A0, C0>, DagArm<ForkOut, A1, C1>, DagArm<ForkOut, A2, C2>)>

Source

pub fn arm<AOut, ACh>( self, f: impl FnOnce(DagArmSeed<ForkOut>) -> DagArm<ForkOut, AOut, ACh>, ) -> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, A0, C0>, DagArm<ForkOut, A1, C1>, DagArm<ForkOut, A2, C2>, DagArm<ForkOut, AOut, ACh>)>

Add a fourth arm to this fork.

Source§

impl<E, ForkOut: 'static, Chain, A0: 'static, C0, A1: 'static, C1> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, A0, C0>, DagArm<ForkOut, A1, C1>)>

Source

pub fn merge<MOut, Params, S>( self, f: S, registry: &Registry, ) -> DagChain<E, MOut, MergeNode2<Chain, C0, C1, S::Step, ForkOut, A0, A1, MOut>>
where MOut: 'static, S: IntoMergeStep<(&'static A0, &'static A1), MOut, Params>, S::Step: for<'x> MergeStepCall<(&'x A0, &'x A1), MOut>,

Merge two arms with a merge step.

Source§

impl<E, ForkOut: 'static, Chain, C0, C1> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, (), C0>, DagArm<ForkOut, (), C1>)>

Source

pub fn join(self) -> DagChain<E, (), JoinNode2<Chain, C0, C1, ForkOut>>

Join two sink arms (all producing ()).

Source§

impl<E, ForkOut: 'static, Chain, A0: 'static, C0, A1: 'static, C1, A2: 'static, C2> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, A0, C0>, DagArm<ForkOut, A1, C1>, DagArm<ForkOut, A2, C2>)>

Source

pub fn merge<MOut, Params, S>( self, f: S, registry: &Registry, ) -> DagChain<E, MOut, MergeNode3<Chain, C0, C1, C2, S::Step, ForkOut, A0, A1, A2, MOut>>
where MOut: 'static, S: IntoMergeStep<(&'static A0, &'static A1, &'static A2), MOut, Params>, S::Step: for<'x> MergeStepCall<(&'x A0, &'x A1, &'x A2), MOut>,

Merge three arms with a merge step.

Source§

impl<E, ForkOut: 'static, Chain, C0, C1, C2> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, (), C0>, DagArm<ForkOut, (), C1>, DagArm<ForkOut, (), C2>)>

Source

pub fn join(self) -> DagChain<E, (), JoinNode3<Chain, C0, C1, C2, ForkOut>>

Join three sink arms (all producing ()).

Source§

impl<E, ForkOut: 'static, Chain, A0: 'static, C0, A1: 'static, C1, A2: 'static, C2, A3: 'static, C3> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, A0, C0>, DagArm<ForkOut, A1, C1>, DagArm<ForkOut, A2, C2>, DagArm<ForkOut, A3, C3>)>

Source

pub fn merge<MOut, Params, S>( self, f: S, registry: &Registry, ) -> DagChain<E, MOut, MergeNode4<Chain, C0, C1, C2, C3, S::Step, ForkOut, A0, A1, A2, A3, MOut>>
where MOut: 'static, S: IntoMergeStep<(&'static A0, &'static A1, &'static A2, &'static A3), MOut, Params>, S::Step: for<'x> MergeStepCall<(&'x A0, &'x A1, &'x A2, &'x A3), MOut>,

Merge four arms with a merge step.

Source§

impl<E, ForkOut: 'static, Chain, C0, C1, C2, C3> DagChainFork<E, ForkOut, Chain, (DagArm<ForkOut, (), C0>, DagArm<ForkOut, (), C1>, DagArm<ForkOut, (), C2>, DagArm<ForkOut, (), C3>)>

Source

pub fn join(self) -> DagChain<E, (), JoinNode4<Chain, C0, C1, C2, C3, ForkOut>>

Join four sink arms (all producing ()).

Auto Trait Implementations§

§

impl<E, ForkOut, Chain, Arms> Freeze for DagChainFork<E, ForkOut, Chain, Arms>
where Chain: Freeze, Arms: Freeze,

§

impl<E, ForkOut, Chain, Arms> RefUnwindSafe for DagChainFork<E, ForkOut, Chain, Arms>
where Chain: RefUnwindSafe, Arms: RefUnwindSafe,

§

impl<E, ForkOut, Chain, Arms> Send for DagChainFork<E, ForkOut, Chain, Arms>
where Chain: Send, Arms: Send,

§

impl<E, ForkOut, Chain, Arms> Sync for DagChainFork<E, ForkOut, Chain, Arms>
where Chain: Sync, Arms: Sync,

§

impl<E, ForkOut, Chain, Arms> Unpin for DagChainFork<E, ForkOut, Chain, Arms>
where Chain: Unpin, Arms: Unpin,

§

impl<E, ForkOut, Chain, Arms> UnsafeUnpin for DagChainFork<E, ForkOut, Chain, Arms>
where Chain: UnsafeUnpin, Arms: UnsafeUnpin,

§

impl<E, ForkOut, Chain, Arms> UnwindSafe for DagChainFork<E, ForkOut, Chain, Arms>
where Chain: UnwindSafe, Arms: UnwindSafe,

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.