Skip to main content

Merge

Trait Merge 

Source
pub trait Merge<Resp> {
    type Merged;

    // Required methods
    fn into_continue(self) -> Self::Merged;
    fn from_done(resp: Response<Resp>) -> Self::Merged;
}
Expand description

Glue trait that lets a Branch::then(jig) accept a jig whose output is a Request, a Response, or another Branch, and merge the two outcomes into a single value.

Required Associated Types§

Source

type Merged

Result of merging this value with the prior Branch.

Required Methods§

Source

fn into_continue(self) -> Self::Merged

Called when the previous Branch was Continue.

Source

fn from_done(resp: Response<Resp>) -> Self::Merged

Called when the previous Branch was Done, propagating its response.

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.

Implementors§

Source§

impl<NewReq, Resp> Merge<Resp> for Branch<NewReq, Resp>

Source§

type Merged = Branch<NewReq, Resp>

Source§

impl<NewReq, Resp> Merge<Resp> for Request<NewReq>

Source§

type Merged = Branch<NewReq, Resp>

Source§

impl<Resp> Merge<Resp> for Response<Resp>