Struct reactor::Reactor

source ·
pub struct Reactor<C> { /* private fields */ }
Expand description

High-level reactor API wrapping reactor Runtime into a thread and providing basic thread management for it.

Apps running the Reactor can interface it and a Handler via use of the Controller API.

Implementations§

Creates new reactor using provided Poll engine and a service exposing Handler API to the reactor.

Both poll engine and the service are sent to the newly created reactor thread which runs the reactor Runtime.

Error

Errors with a system/OS error if it was impossible to spawn a thread.

Creates new reactor using provided Poll engine and a service exposing Handler API to the reactor.

Similar to the Reactor::new, but allows to specify the name for the reactor thread. Both poll engine and the service are sent to the newly created reactor thread which runs the reactor Runtime.

Error

Errors with a system/OS error if it was impossible to spawn a thread.

Creates new reactor using provided Poll engine and a service exposing Handler API to the reactor.

Similar to the Reactor::new, but allows to fully customize how the reactor thread is constructed. Both poll engine and the service are sent to the newly created reactor thread which runs the reactor Runtime.

Error

Errors with a system/OS error if it was impossible to spawn a thread.

Provides a copy of a Controller object which exposes an API to the reactor and a service running inside of its thread.

See Handler::Command for the details.

Joins the reactor thread.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.