Struct transaction::MapErr
[−]
[src]
#[must_use]pub struct MapErr<Tx, F> { /* fields omitted */ }
The result of map_err
Trait Implementations
impl<Tx: Debug, F: Debug> Debug for MapErr<Tx, F>
[src]
impl<E, Tx, F> Transaction for MapErr<Tx, F> where
Tx: Transaction,
F: Fn(Tx::Err) -> E,
[src]
Tx: Transaction,
F: Fn(Tx::Err) -> E,
type Ctx = Tx::Ctx
The contxt type (i.e. transaction type) of the transaction
type Item = Tx::Item
The return type of the transaction
type Err = E
The error type of the transaction
fn run(&self, ctx: &mut Self::Ctx) -> Result<Self::Item, Self::Err>
Run the transaction. This will called by transaction runner rather than user by hand. Read more
fn boxed<'a>(
self
) -> Box<Transaction<Ctx = Self::Ctx, Item = Self::Item, Err = Self::Err> + 'a> where
Self: Sized + 'a,
self
) -> Box<Transaction<Ctx = Self::Ctx, Item = Self::Item, Err = Self::Err> + 'a> where
Self: Sized + 'a,
Box the transaction
fn then<F, B, Tx2>(self, f: F) -> Then<Self, F, Tx2> where
Tx2: IntoTransaction<Self::Ctx, Item = B, Err = Self::Err>,
F: Fn(Result<Self::Item, Self::Err>) -> Tx2,
Self: Sized,
Tx2: IntoTransaction<Self::Ctx, Item = B, Err = Self::Err>,
F: Fn(Result<Self::Item, Self::Err>) -> Tx2,
Self: Sized,
Take the previous result of computation and do another computation
fn map<F, B>(self, f: F) -> Map<Self, F> where
F: Fn(Self::Item) -> B,
Self: Sized,
F: Fn(Self::Item) -> B,
Self: Sized,
Transform the previous successful value
fn and_then<F, B>(self, f: F) -> AndThen<Self, F, B> where
B: IntoTransaction<Self::Ctx, Err = Self::Err>,
F: Fn(Self::Item) -> B,
Self: Sized,
B: IntoTransaction<Self::Ctx, Err = Self::Err>,
F: Fn(Self::Item) -> B,
Self: Sized,
Take the previous successful value of computation and do another computation Read more
fn map_err<F, B>(self, f: F) -> MapErr<Self, F> where
F: Fn(Self::Err) -> B,
Self: Sized,
F: Fn(Self::Err) -> B,
Self: Sized,
Transform the previous error value
fn or_else<F, B>(self, f: F) -> OrElse<Self, F, B> where
B: IntoTransaction<Self::Ctx, Item = Self::Item>,
F: Fn(Self::Err) -> B,
Self: Sized,
B: IntoTransaction<Self::Ctx, Item = Self::Item>,
F: Fn(Self::Err) -> B,
Self: Sized,
Take the previous error value of computation and do another computation. This may be used falling back Read more
fn abort<T, F>(self, f: F) -> Abort<Self, T, F> where
F: Fn(Self::Item) -> Self::Err,
Self: Sized,
F: Fn(Self::Item) -> Self::Err,
Self: Sized,
Take the previous successfull value of computation and abort the transaction. Read more
fn try_abort<F, B>(self, f: F) -> TryAbort<Self, F, B> where
F: Fn(Self::Item) -> Result<B, Self::Err>,
Self: Sized,
F: Fn(Self::Item) -> Result<B, Self::Err>,
Self: Sized,
Try to abort the transaction
fn recover<T, F>(self, f: F) -> Recover<Self, T, F> where
F: Fn(Self::Err) -> Self::Item,
Self: Sized,
F: Fn(Self::Err) -> Self::Item,
Self: Sized,
Recover from an error
fn try_recover<F, B>(self, f: F) -> TryRecover<Self, F, B> where
F: Fn(Self::Err) -> Result<Self::Item, B>,
Self: Sized,
F: Fn(Self::Err) -> Result<Self::Item, B>,
Self: Sized,
Try to recover from an error
fn join<B>(self, b: B) -> Join<Self, B::Tx> where
B: IntoTransaction<Self::Ctx, Err = Self::Err>,
Self: Sized,
B: IntoTransaction<Self::Ctx, Err = Self::Err>,
Self: Sized,
join 2 indepndant transactions
fn join3<B, C>(self, b: B, c: C) -> Join3<Self, B::Tx, C::Tx> where
B: IntoTransaction<Self::Ctx, Err = Self::Err>,
C: IntoTransaction<Self::Ctx, Err = Self::Err>,
Self: Sized,
B: IntoTransaction<Self::Ctx, Err = Self::Err>,
C: IntoTransaction<Self::Ctx, Err = Self::Err>,
Self: Sized,
join 3 indepndant transactions
fn join4<B, C, D>(self, b: B, c: C, d: D) -> Join4<Self, B::Tx, C::Tx, D::Tx> where
B: IntoTransaction<Self::Ctx, Err = Self::Err>,
C: IntoTransaction<Self::Ctx, Err = Self::Err>,
D: IntoTransaction<Self::Ctx, Err = Self::Err>,
Self: Sized,
B: IntoTransaction<Self::Ctx, Err = Self::Err>,
C: IntoTransaction<Self::Ctx, Err = Self::Err>,
D: IntoTransaction<Self::Ctx, Err = Self::Err>,
Self: Sized,
join 4 indepndant transactions
fn branch(self) -> BranchBuilder<Self> where
Self: Sized,
Self: Sized,
branch builder
fn branch3(self) -> Branch3Builder<Self> where
Self: Sized,
Self: Sized,
3 branch builder
fn branch4(self) -> Branch4Builder<Self> where
Self: Sized,
Self: Sized,
4 branch builder