pub struct CommandOutput {
pub data: Value,
pub headers: Vec<String>,
pub rows: Vec<Vec<String>>,
pub format: OutputFormat,
pub addendum: Option<String>,
pub warnings: Vec<String>,
/* private fields */
}Fields§
§data: Value§headers: Vec<String>§rows: Vec<Vec<String>>§format: OutputFormat§addendum: Option<String>§warnings: Vec<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 with_warning(self, warning: impl Into<String>) -> Self
pub fn add_warning(&mut self, warning: impl Into<String>)
pub fn with_suppress_final_output(self, suppress: bool) -> 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