SplitBranchResult

Type Alias SplitBranchResult 

Source
pub type SplitBranchResult<'w, 's, 'a, 'b, T> = Result<SplitBuilder<'w, 's, 'a, 'b, T>, (SplitBuilder<'w, 's, 'a, 'b, T>, SplitConnectionError)>;
Expand description

This is a type alias for the result returned by the branching SplitBuilder functions. If the last connection succeeded, you will receive Ok with the SplitBuilder which you can keep building off of. Otherwise if the last connection failed, you will receive an Err with the SplitBuilder bundled with SplitConnectionError to tell you what went wrong. You can continue building with the SplitBuilder even if an error occurred.

You can use ignore_result from the IgnoreSplitChainResult trait to just keep chaining without checking whether the connection suceeded.

Aliased Type§

pub enum SplitBranchResult<'w, 's, 'a, 'b, T> {
    Ok(SplitBuilder<'w, 's, 'a, 'b, T>),
    Err((SplitBuilder<'w, 's, 'a, 'b, T>, SplitConnectionError)),
}

Variants§

§1.0.0

Ok(SplitBuilder<'w, 's, 'a, 'b, T>)

Contains the success value

§1.0.0

Err((SplitBuilder<'w, 's, 'a, 'b, T>, SplitConnectionError))

Contains the error value

Trait Implementations§

Source§

impl<'w, 's, 'a, 'b, T: Splittable> IgnoreSplitChainResult<'w, 's, 'a, 'b, T> for SplitBranchResult<'w, 's, 'a, 'b, T>

Source§

fn ignore_result(self) -> SplitBuilder<'w, 's, 'a, 'b, T>

Ignore whether the result of the chaining connection was Ok or Err and just keep chaining.