#[non_exhaustive]pub enum LineOutcome {
Sent,
NoStdin,
NotWritten {
reason: String,
},
}Expand description
What happened when the shepherd tried to write one line to a sheep’s stdin.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sent
The line was written to the pipe and flushed.
Says the bytes left the shepherd, not that the app read them. A pipe holds 64 KiB before it blocks.
NoStdin
The sheep has no stdin pipe: its config does not set stdin = true, or
it is not running.
One outcome for two causes: both answer “there is no pipe here”.
NotWritten
The shepherd had a pipe and did not confirm a write to it; carries why.
Three shapes reach it: the write failed (the far end is gone), the line found the sheep’s queue already full, or the write did not finish inside the shepherd’s own bound. The reason names which.
A timed-out write is not a promise the line was never written: the bytes may be part-written into a pipe the app is not draining, and land in full the moment it drains. A line still queued behind that one is dropped once its caller gives up, so treat a retry as a second command.
Trait Implementations§
Source§impl Clone for LineOutcome
impl Clone for LineOutcome
Source§fn clone(&self) -> LineOutcome
fn clone(&self) -> LineOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LineOutcome
impl Debug for LineOutcome
Source§impl<'de> Deserialize<'de> for LineOutcome
impl<'de> Deserialize<'de> for LineOutcome
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for LineOutcome
Source§impl PartialEq for LineOutcome
impl PartialEq for LineOutcome
Source§impl Serialize for LineOutcome
impl Serialize for LineOutcome
impl StructuralPartialEq for LineOutcome
Auto Trait Implementations§
impl Freeze for LineOutcome
impl RefUnwindSafe for LineOutcome
impl Send for LineOutcome
impl Sync for LineOutcome
impl Unpin for LineOutcome
impl UnsafeUnpin for LineOutcome
impl UnwindSafe for LineOutcome
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.