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 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.
Create a handle to this BreadThread
that can send directives.