pub struct CommandOutput {
pub data: Value,
pub headers: Vec<String>,
pub rows: Vec<Vec<String>>,
pub format: OutputFormat,
pub addendum: Option<String>,
}Fields§
§data: Value§headers: Vec<String>§rows: Vec<Vec<String>>§format: OutputFormat§addendum: Option<String>Implementations§
Source§impl CommandOutput
impl CommandOutput
pub fn new(data: Value, headers: Vec<String>, rows: Vec<Vec<String>>) -> Self
pub fn json(data: Value) -> Self
pub fn new_empty() -> Self
pub fn with_format(self, format: OutputFormat) -> Self
pub fn with_addendum(self, addendum: impl Into<String>) -> Self
pub fn render(&self) -> String
Trait Implementations§
Source§impl Debug for CommandOutput
impl Debug for CommandOutput
Auto Trait Implementations§
impl Freeze for CommandOutput
impl RefUnwindSafe for CommandOutput
impl Send for CommandOutput
impl Sync for CommandOutput
impl Unpin for CommandOutput
impl UnsafeUnpin for CommandOutput
impl UnwindSafe for CommandOutput
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