Struct exec_rs::CombinedInvoker[][src]

pub struct CombinedInvoker<O: Invoker, I: Invoker> { /* fields omitted */ }
Expand description

Struct that enables combining two Invokers by calling the second invoker inside the first one.

Implementations

impl<O: Invoker, I: Invoker> CombinedInvoker<O, I>[src]

pub fn combine(outer: O, inner: I) -> CombinedInvoker<O, I>[src]

Trait Implementations

impl<O: Invoker, I: Invoker> Invoker for CombinedInvoker<O, I>[src]

fn invoke_with_mode_optional<'f, T: 'f, F: FnOnce() -> T + 'f>(
    &'f self,
    mode: Option<&'f Mode<'f, T>>,
    task: F
) -> T
[src]

Invoke a task, optionally with a Mode supplied. Read more

fn pre_invoke(&self)[src]

Called by invoke_with_mode_optional before invoking each task. Can be used to run code before a task is invoked. Read more

fn invoke_with_mode<'f, T: 'f, F: FnOnce() -> T + 'f>(
    &'f self,
    mode: &'f Mode<'f, T>,
    task: F
) -> T
[src]

Invoke a task with a Mode. The default implementation for do_invoke delegates to crate::invoke if a mode was supplied. The Mode is applied to the task invoked by this Invoker, meaning the task of modes will run inside the do_invoke invocation so that logic run by the invoker before the task runs executes before the modes and logic run by the invoker after the task executes after the modes. Read more

fn invoke<'f, T: 'f, F: FnOnce() -> T + 'f>(&'f self, task: F) -> T[src]

Invoke a task using this invoker without a Mode. Read more

fn do_invoke<'f, T: 'f, F: FnOnce() -> T + 'f>(
    &'f self,
    mode: Option<&'f Mode<'f, T>>,
    task: F
) -> T
[src]

Core function responsible for actually invoking the task. This allows implementors to easily override how tasks are invoked without having to worry about doing any administrative tasks such as calling pre_invoke and post_invoke as would be the case when overriding invoke_with_mode_optional. Read more

fn post_invoke(&self)[src]

Called by invoke_with_mode_optional after invoking each task. Can be used to run code after a task is invoked. Read more

fn invoke_post_invoke_on_panic(&self) -> bool[src]

Return true if post_invoke should be called even if the task panicked using a Sentinel, defaults to false. Read more

fn and_then<I: Invoker>(self, inner: I) -> CombinedInvoker<Self, I> where
    Self: Sized
[src]

Combines this Invoker with another Invoker by creating a CombinedInvoker that invokes tasks by first calling this Invoker with a task that submits the supplied task to the other Invoker, meaning the other Invoker will run inside this Invoker in such a way that the logic of this Invoker that runs before the task executes before the logic of the other Invoker but the logic of this Invoker that runs after the task executes after the logic of the other Invoker. Read more

Auto Trait Implementations

impl<O, I> RefUnwindSafe for CombinedInvoker<O, I> where
    I: RefUnwindSafe,
    O: RefUnwindSafe

impl<O, I> Send for CombinedInvoker<O, I> where
    I: Send,
    O: Send

impl<O, I> Sync for CombinedInvoker<O, I> where
    I: Sync,
    O: Sync

impl<O, I> Unpin for CombinedInvoker<O, I> where
    I: Unpin,
    O: Unpin

impl<O, I> UnwindSafe for CombinedInvoker<O, I> where
    I: UnwindSafe,
    O: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.