[][src]Enum json_job_dispatch::HandlerResult

pub enum HandlerResult {
    Accept,
    Defer(String),
    Reject(String),
    Fail(Box<dyn Error + Send + 'static>),
    Restart,
    Done,
}

Results from an event.

Variants

Accept

The event was accepted and acted upon.

Defer(String)

The event was deferred until a later time for the given reason.

Reject(String)

The event was rejected for the given reason.

Fail(Box<dyn Error + Send + 'static>)

The event failed with the given error.

Restart

The director should be restarted.

Done

The event was the last one which should be processed.

Methods

impl HandlerResult[src]

pub fn accept() -> Self[src]

Create an accept result.

pub fn defer<M>(msg: M) -> Self where
    M: Into<String>, 
[src]

Create a deferral result.

pub fn reject<M>(msg: M) -> Self where
    M: Into<String>, 
[src]

Create a rejecting result.

pub fn fail<E>(err: E) -> Self where
    E: Into<Box<dyn Error + Send + Sync + 'static>>, 
[src]

Create a failure.

pub fn restart() -> Self[src]

Create a restart result.

pub fn done() -> Self[src]

Create a completion result.

pub fn combine(self, other: Self) -> Self[src]

Combine two handler results into one.

Trait Implementations

impl Debug for HandlerResult[src]

Auto Trait Implementations

Blanket Implementations

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

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

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.

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.

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

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,