pub struct EventReactor { /* private fields */ }
Expand description

A reactor used to forward events to make the event reporting system work.

Note

Currently, this type is a singleton; there is one event reporting system used for the entire program. This is not stable, and may change in future.

Implementations

Initialize the event reporting system, returning a reactor that must be run for it to work, and a TorEventReceiver that can be used to extract events from the system. If the system has already been initialized, returns None instead of a reactor.

Warnings

The returned reactor must be run with EventReactor::run, in a background async task. If it is not, the event system might consume unbounded amounts of memory.

Get a TorEventReceiver to receive events from, assuming an EventReactor is already running somewhere. (If it isn’t, returns None.)

As noted in the type-level documentation, this function might not always work this way.

Run the event forwarding reactor.

You must call this function once a reactor is created.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more