pub trait IntoCxxAsyncStream: Sized {
type Item;
// Required method
fn fallible<Stm>(stream: Stm) -> Self
where Stm: Stream<Item = CxxAsyncResult<Self::Item>> + Send + 'static;
// Provided method
fn infallible<Stm>(stream: Stm) -> Self
where Stm: Stream<Item = Self::Item> + Send + 'static,
Stm::Item: 'static { ... }
}
Expand description
Wraps an arbitrary Rust Stream in a boxed cxx-async
stream so that it can be returned to C++.
You should not need to implement this manually; it’s automatically implemented by the
bridge_stream
macro.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.