pub enum StdinSource {
Terminal,
Foreign,
Stream,
}Expand description
Whether stdin holds input for this turn.
a consumes stdin so cargo test 2>&1 | a "fix this" works. Consuming it
whenever it merely is not a terminal is wrong: a supervisor or sandbox hands
its child a socket that may never carry anything, and reading it blocks
forever.
A pipe or a redirected file is read to end of file, however long the producer takes, because writing the pipe is how the user asked for that. Waiting is what every filter does; giving up early would silently drop the input of a producer that is simply slow to start.
Variants§
Trait Implementations§
Source§impl Clone for StdinSource
impl Clone for StdinSource
Source§fn clone(&self) -> StdinSource
fn clone(&self) -> StdinSource
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 moreimpl Copy for StdinSource
Source§impl Debug for StdinSource
impl Debug for StdinSource
impl Eq for StdinSource
Source§impl PartialEq for StdinSource
impl PartialEq for StdinSource
impl StructuralPartialEq for StdinSource
Auto Trait Implementations§
impl Freeze for StdinSource
impl RefUnwindSafe for StdinSource
impl Send for StdinSource
impl Sync for StdinSource
impl Unpin for StdinSource
impl UnsafeUnpin for StdinSource
impl UnwindSafe for StdinSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.