pub struct AnyStream<'a, T>(/* private fields */);Expand description
A type-erased Stream implementation that wraps stream (outputs)Stream::Output in
Box<dyn Any>.
This is useful as the final layer in a stack of nested Streams that allows the top
level Executor to operate without knowledge of the concrete output types.
From a performance perspective, this is usually fine since
Implementations§
Trait Implementations§
Source§impl<A, T> Stream<A> for AnyStream<'_, T>
impl<A, T> Stream<A> for AnyStream<'_, T>
Source§fn insert(&mut self, args: A::Insert<'_>) -> Result<Self::Output>
fn insert(&mut self, args: A::Insert<'_>) -> Result<Self::Output>
Perform an insert operation.
Source§fn replace(&mut self, args: A::Replace<'_>) -> Result<Self::Output>
fn replace(&mut self, args: A::Replace<'_>) -> Result<Self::Output>
Perform a replace operation.
Source§fn maintain(&mut self, args: A::Maintain<'_>) -> Result<Self::Output>
fn maintain(&mut self, args: A::Maintain<'_>) -> Result<Self::Output>
Perform a maintain operation.
Source§fn needs_maintenance(&mut self) -> bool
fn needs_maintenance(&mut self) -> bool
Indicate whether or not maintenance is needed.
Executor implementations
are responsible periodically checking this.Auto Trait Implementations§
impl<'a, T> !UnwindSafe for AnyStream<'a, T>
impl<'a, T> Freeze for AnyStream<'a, T>
impl<'a, T> RefUnwindSafe for AnyStream<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for AnyStream<'a, T>where
T: Send,
impl<'a, T> Sync for AnyStream<'a, T>where
T: Sync,
impl<'a, T> Unpin for AnyStream<'a, T>
impl<'a, T> UnsafeUnpin for AnyStream<'a, T>
Blanket Implementations§
impl<T> AsyncFriendly for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more