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> 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>
impl<'a, T> !UnwindSafe for AnyStream<'a, T>
Blanket Implementations§
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
Source§impl<T> DispatchRule<T> for T
impl<T> DispatchRule<T> for T
Source§type Error = Infallible
type Error = Infallible
Errors that can occur during
convert.Source§fn try_match(_from: &T) -> Result<MatchScore, FailureScore>
fn try_match(_from: &T) -> Result<MatchScore, FailureScore>
Source§fn convert(from: T) -> Result<T, <T as DispatchRule<T>>::Error>
fn convert(from: T) -> Result<T, <T as DispatchRule<T>>::Error>
Perform the actual conversion. Read more
Source§fn description(f: &mut Formatter<'_>, from: Option<&T>) -> Result<(), Error>
fn description(f: &mut Formatter<'_>, from: Option<&T>) -> Result<(), Error>
Write a description of the dispatch rule and outcome to the formatter. Read more
Source§fn try_match_verbose<'a>(
from: &'a From,
) -> Result<MatchScore, TaggedFailureScore<'a>>where
Self: 'a,
fn try_match_verbose<'a>(
from: &'a From,
) -> Result<MatchScore, TaggedFailureScore<'a>>where
Self: 'a,
The equivalent of
try_match but returns a reason for a failed score. Read more