Struct market::thread::Thread[][src]

pub struct Thread<S, E> { /* fields omitted */ }

A wrapper around the std::thread functionality.

Consumes the status of running the given closure. Thus, consumption replaces the functionality of std::thread::JoinHandle::join().

Implementations

impl<S: Send + 'static, E: TryFrom<ConsumeFailure<E>> + Send + 'static> Thread<S, E>[src]

pub fn new<P: Send + 'static, F: FnMut(&mut P) -> Result<S, E> + RefUnwindSafe + Send + 'static>(
    name: String,
    kind: Kind,
    mut parameters: P,
    mut call: F
) -> Self
[src]

Creates a new Thread and spawns call.

pub fn cancel(&self)[src]

Requests that self be canceled.

Trait Implementations

impl<S, E: TryFrom<ConsumeFailure<E>>> Consumer for Thread<S, E>[src]

type Good = S

The item being consumed.

type Failure = ConsumeFailure<E>

Describes a failure to successfully complete consumption.

impl<S: Debug, E: Debug> Debug for Thread<S, E>[src]

Auto Trait Implementations

impl<S, E> !RefUnwindSafe for Thread<S, E>[src]

impl<S, E> Send for Thread<S, E> where
    E: Send,
    S: Send
[src]

impl<S, E> Sync for Thread<S, E> where
    E: Send,
    S: Send
[src]

impl<S, E> Unpin for Thread<S, E>[src]

impl<S, E> !UnwindSafe for Thread<S, E>[src]

Blanket Implementations

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

impl<P, C> AssembleInto<C> for P where
    C: AssembleFrom<P>, 
[src]

type Error = <C as AssembleFrom<P>>::Error

Describes an error with the parts. Read more

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

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

impl<P, C> DisassembleInto<P> for C where
    P: DisassembleFrom<C>, 
[src]

type Error = <P as DisassembleFrom<C>>::Error

Describes an error that prevents disassembly.

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.