4 releases

0.1.7 Jul 16, 2024
0.1.6 Jul 8, 2024
0.1.5 Mar 29, 2024
0.1.4 Mar 29, 2024

#854 in Asynchronous

Download history 29/week @ 2024-07-29 75/week @ 2024-08-12 2/week @ 2024-08-26 116/week @ 2024-09-09 24/week @ 2024-09-16 94/week @ 2024-09-23 100/week @ 2024-09-30 14/week @ 2024-10-07 28/week @ 2024-10-14 7/week @ 2024-10-21 20/week @ 2024-11-04

55 downloads per month
Used in ruchei

MIT/Apache

15KB
139 lines

Sinks with routing inspired by ZeroMQ's ROUTER sockets.

This model sits somewhere between explicit connection management and ZMQ-like routing trying to be a reasonable abstraction around both, with some trade-offs.

Sinks

Proper RouteSinks

RouteSink as a trait union

Dynamicity

Object safety

RouteSink method is object safe.

However, we don't provide any methods to upcast to Sink, since we believe plain Sink and RouteSink traits don't represent our target usecases, specifically networking, which involve Streams as a necessary component of the object. Since this crate doesn't depend on futures-core, we don't provide dyn Stream + ... either. Another consideration is to provide mechanisms for creating upcasting instead of providing upcasting itself, to, for example, allow for a more efficient FFI functionality.

FFI

Coming Soon...

Dependencies

~135KB