Module dbcrossbarlib::tokio_glue [−][src]
Expand description
Glue code for working with tokio
’s async I/O.
This is mostly smaller things that happen to recur in our particular application.
Traits
Extension for BoxStream<BoxFuture<()>>
.
Functions
Run a synchronous function f
in a background worker thread and return its
value.
Copy stream
into sink
. If stream
returns an Err
value, stop
immediately.
Type Definitions
Standard future type for this library. Like Result
, but used by async. We
mark it as Send
to ensure it can be sent between threads safely (even when
blocked on .await
!), and we Pin<Box<...>>
it using .boxed()
to make it
an abstract, heap-based type, for convenience. All we know is that it will
return a Result<T>
.
A stream of values of type T
, using our standard error type, and imposing
enough restrictions to be able send streams between threads.