[][src]Enum employer::Job

pub enum Job<'a, K, V> {
    None,
    InProgress,
    Finished(OutputGuard<'a, K, V>),
}

The status of a job

Variants

None

No job exists with the given input

InProgress

The job is in progress

Finished(OutputGuard<'a, K, V>)

The job has finished

Methods

impl<'a, K, V> Job<'a, K, V>[src]

pub fn is_finished(&self) -> bool[src]

Check if the Job is finished

pub fn is_in_progress(&self) -> bool[src]

Check if the Job is in progress

pub fn exists(&self) -> bool[src]

Check if the Job exists

pub fn as_finished(&self) -> Option<&OutputGuard<'a, K, V>>[src]

Get a reference to the result of the Job if is is finished

pub fn finished(self) -> Option<OutputGuard<'a, K, V>>[src]

Convert the Job to an Option<OutputGuard>

Trait Implementations

impl<'a, K, V> Debug for Job<'a, K, V> where
    V: Debug
[src]

impl<'a, K, V> Default for Job<'a, K, V>[src]

impl<'a, K, V> From<Job<'a, K, V>> for Option<OutputGuard<'a, K, V>>[src]

Auto Trait Implementations

impl<'a, K, V> !RefUnwindSafe for Job<'a, K, V>

impl<'a, K, V> Send for Job<'a, K, V> where
    K: Send,
    V: Send

impl<'a, K, V> Sync for Job<'a, K, V> where
    K: Sync,
    V: Sync

impl<'a, K, V> Unpin for Job<'a, K, V>

impl<'a, K, V> !UnwindSafe for Job<'a, K, V>

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.