pub trait StreamInterop<A: Actor>: Stream + Sized {
// Required method
fn interop_actor(self, actor: &A) -> StreamInteropWrap<A, Self>;
// Provided method
fn interop_actor_boxed(
self,
actor: &A,
) -> Box<dyn ActorStream<A, Item = Self::Item>>
where Self: 'static { ... }
}
Expand description
Extension trait implemented for all streams. Import this trait to bring the
interop_actor
and
interop_actor_boxed
methods into scope.
Required Methods§
Sourcefn interop_actor(self, actor: &A) -> StreamInteropWrap<A, Self>
fn interop_actor(self, actor: &A) -> StreamInteropWrap<A, Self>
Convert a stream using the with_ctx
or critical_section
methods into an ActorStream.
Provided Methods§
Sourcefn interop_actor_boxed(
self,
actor: &A,
) -> Box<dyn ActorStream<A, Item = Self::Item>>where
Self: 'static,
fn interop_actor_boxed(
self,
actor: &A,
) -> Box<dyn ActorStream<A, Item = Self::Item>>where
Self: 'static,
Convert a stream using the with_ctx
or critical_section
methods into a boxed
ActorStream.
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.