pub struct P4Output { /* private fields */ }Expand description
Collected output from a single p4 invocation.
Holds raw stdout/stderr bytes (supports binary content) and the exit code. The child process is guaranteed to have been reaped before this struct is returned.
Implementations§
Source§impl P4Output
impl P4Output
pub fn exit_code(&self) -> i32
Sourcepub fn stdout_str(&self) -> Result<&str>
pub fn stdout_str(&self) -> Result<&str>
Decode stdout as UTF-8.
Sourcepub fn stderr_str(&self) -> Result<&str>
pub fn stderr_str(&self) -> Result<&str>
Decode stderr as UTF-8.
Sourcepub fn stdout_lines(&self) -> Result<Vec<&str>>
pub fn stdout_lines(&self) -> Result<Vec<&str>>
Lines of stdout (UTF-8 text only).
Sourcepub fn stderr_lines(&self) -> Result<Vec<&str>>
pub fn stderr_lines(&self) -> Result<Vec<&str>>
Lines of stderr (UTF-8 text only).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for P4Output
impl RefUnwindSafe for P4Output
impl Send for P4Output
impl Sync for P4Output
impl Unpin for P4Output
impl UnsafeUnpin for P4Output
impl UnwindSafe for P4Output
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