Struct breadthread::BreadThread[][src]

pub struct BreadThread<'evh, Ctrl: Controller> { /* fields omitted */ }
Expand description

The object representing the bread thread. The thread this object is created in is the bread thread, and it cannot be moved out of the bread thread.

The lifetime associated with this object is the lifetime of whatever event handler is passed in. If you want to pass its handles between threads, this lifetime will probably be 'static unless you’re using scoped threads or scoped executors.

Implementations

Create a new BreadThread from a controller. This function returns an error if the thread is already a bread thread.

Create a new BreadThread from a controller. This function panics an error if the thread is already a bread thread.

Use the controller in a closure.

Use the controller in a mutable closure.

Send a directive to the thread’s controller.

Set the event handler we are using for the bread thread.

Process an event using the currently set event handler.

Run the main loop.

Create a handle to this BreadThread that can send directives.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.