pub struct DiscardedOutputStream { /* private fields */ }Expand description
Marker stream for a stdio slot configured with std::process::Stdio::null().
The OS discards the child’s writes; no pipe is allocated and no reader task runs. The
read_chunk_size and max_buffered_chunks accessors are present because OutputStream
requires them, but they have no operational meaning for this variant and return zero.
Trait Implementations§
Source§impl Clone for DiscardedOutputStream
impl Clone for DiscardedOutputStream
Source§fn clone(&self) -> DiscardedOutputStream
fn clone(&self) -> DiscardedOutputStream
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Consumable for DiscardedOutputStream
impl Consumable for DiscardedOutputStream
Source§type Error = Infallible
type Error = Infallible
Error returned when consumer creation fails. Must be constructible from the underlying
Subscribable::SubscribeError so the default consume / consume_async impls can
propagate subscription failures.Source§fn consume<V>(&self, visitor: V) -> Result<Consumer<V::Output>, Self::Error>where
V: StreamVisitor,
Self: OutputStream,
fn consume<V>(&self, visitor: V) -> Result<Consumer<V::Output>, Self::Error>where
V: StreamVisitor,
Self: OutputStream,
Tries to drive the provided synchronous
StreamVisitor over this stream and returns a
Consumer that owns the spawned task. Read moreSource§fn consume_async<V>(
&self,
visitor: V,
) -> Result<Consumer<V::Output>, Self::Error>where
V: AsyncStreamVisitor,
Self: OutputStream,
fn consume_async<V>(
&self,
visitor: V,
) -> Result<Consumer<V::Output>, Self::Error>where
V: AsyncStreamVisitor,
Self: OutputStream,
Tries to drive the provided asynchronous
AsyncStreamVisitor over this stream and
returns a Consumer that owns the spawned task. Read moreSource§impl Debug for DiscardedOutputStream
impl Debug for DiscardedOutputStream
Source§impl OutputStream for DiscardedOutputStream
impl OutputStream for DiscardedOutputStream
Source§fn read_chunk_size(&self) -> NumBytes
fn read_chunk_size(&self) -> NumBytes
The maximum size of every chunk read by the backing
stream_reader.Source§fn max_buffered_chunks(&self) -> usize
fn max_buffered_chunks(&self) -> usize
The number of chunks held by the underlying async channel.
Source§impl PartialEq for DiscardedOutputStream
impl PartialEq for DiscardedOutputStream
Source§fn eq(&self, other: &DiscardedOutputStream) -> bool
fn eq(&self, other: &DiscardedOutputStream) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Subscribable for DiscardedOutputStream
impl Subscribable for DiscardedOutputStream
Source§type Subscription = ImmediateEof
type Subscription = ImmediateEof
The concrete subscription handle returned by
try_subscribe.Source§type SubscribeError = Infallible
type SubscribeError = Infallible
The error returned when subscription fails.
Source§fn try_subscribe(&self) -> Result<Self::Subscription, Self::SubscribeError>
fn try_subscribe(&self) -> Result<Self::Subscription, Self::SubscribeError>
Creates a new subscription for a consumer, or returns why the consumer cannot be started. Read more
impl Copy for DiscardedOutputStream
impl Eq for DiscardedOutputStream
impl StructuralPartialEq for DiscardedOutputStream
Auto Trait Implementations§
impl Freeze for DiscardedOutputStream
impl RefUnwindSafe for DiscardedOutputStream
impl Send for DiscardedOutputStream
impl Sync for DiscardedOutputStream
impl Unpin for DiscardedOutputStream
impl UnsafeUnpin for DiscardedOutputStream
impl UnwindSafe for DiscardedOutputStream
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