Struct sodium_rust::Router

source ·
pub struct Router<A, K> { /* private fields */ }
Expand description

Create a new Router that routes event items of type A to zero or more Streams of type K according to a given selector function.

Implementations§

Create a new Router from the given input stream and selector function.

Create a Stream that is subscribed to event values that the selector function routes to the given K value.

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.