Struct sauce::output::Output

source ·
pub struct Output { /* private fields */ }

Implementations§

source§

impl Output

source

pub fn new(out: Box<dyn Write>, err: Box<dyn Write>) -> Self

source

pub fn quiet(self, value: bool) -> Self

source

pub fn set_quiet(&mut self, value: bool)

source

pub fn verbose(self, value: bool) -> Self

source

pub fn set_verbose(&mut self, value: bool)

source

pub fn color(self, value: bool) -> Self

source

pub fn show(self, value: bool) -> Self

source

pub fn set_show(&mut self, value: bool)

source

pub fn format_table( &self, headers: &[&str], data: Vec<Vec<&str>>, preset: Option<&str> ) -> String

source

pub fn output(&mut self, output: impl Display) -> bool

source

pub fn notify(&mut self, message: &[ANSIString<'_>]) -> String

source

pub fn notify_str(&mut self, message: &str) -> String

source

pub fn notify_error( &mut self, code: ErrorCode, message: &[ANSIString<'_>] ) -> String

source

pub fn error_code(&self) -> Option<i32>

source

pub fn flush(&mut self) -> Result<()>

source

pub fn write_toml<I, T>( &mut self, file: &Path, document: &mut Document, heading: &str, values: I )where I: IntoIterator<Item = (T, Item)>, T: AsRef<str>,

source

pub fn create_file(&mut self, file: &Path) -> Result<(), String>

source

pub fn move_file( &mut self, source: &Path, dest: &Path, copy: bool ) -> Result<(), String>

Trait Implementations§

source§

impl Debug for Output

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Output

§

impl !Send for Output

§

impl !Sync for Output

§

impl Unpin for Output

§

impl !UnwindSafe for Output

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.