pub struct Output {
pub stdout: Vec<u8>,
pub stderr: String,
pub code: i32,
}Fields§
§stdout: Vec<u8>Raw bytes, never a lossy String.
A job may emit a tarball, or simply invalid UTF-8, and the probe reply
carries log bytes inside this field. String::from_utf8_lossy would
silently substitute replacement characters — corrupting the one artifact
the entire design treats as the source of truth. Text-only would have
been a defensible scope cut; silent corruption is not.
stderr: StringText, because this is ssh’s own diagnostics and errors pattern-matches
them. A non-UTF-8 ssh error message is not a case worth carrying bytes
for.
code: i32Implementations§
Source§impl Output
impl Output
pub fn ok(stdout: impl Into<Vec<u8>>) -> Self
Sourcepub fn text(&self) -> Cow<'_, str>
pub fn text(&self) -> Cow<'_, str>
The stdout as text, for the many call sites parsing a known-ASCII reply
(rc=0, a session count). Lossy on purpose and only here: these fields
are coop’s own output, not the user’s.
pub fn fail(code: i32, stderr: impl Into<String>) -> Self
Trait Implementations§
impl Eq for Output
impl StructuralPartialEq for Output
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnsafeUnpin for Output
impl UnwindSafe for Output
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> 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.