pub struct Writer(pub Box<dyn Write>);
Tuple Fields§
§0: Box<dyn Write>
Implementations§
Source§impl Writer
impl Writer
pub fn new(path: &Path) -> Result<Self, Error>
pub fn file_or_stdout(export: bool, path: &Path) -> Result<Self, Error>
pub fn stdout() -> Result<Self, Error>
pub fn append_to(out: &Path) -> Result<Self, Error>
pub fn write_bytes(&mut self, bytes: &[u8]) -> CliResult
pub fn write_bytes_unchecked(&mut self, bytes: &[u8])
pub fn write_header(&mut self, row: &str) -> CliResult
pub fn write_str<T: AsRef<str>>(&mut self, row: T) -> CliResult
pub fn write_str_unchecked<T: AsRef<str>>(&mut self, row: T)
pub fn write_strings<T: AsRef<str>>(&mut self, lines: &[T]) -> CliResult
pub fn write_strings_unchecked<T: AsRef<str>>(&mut self, lines: &[T])
pub fn write_fields<T: AsRef<str>>(&mut self, line: &[T]) -> CliResult
pub fn write_fields_unchecked<T: AsRef<str>>(&mut self, line: &[T])
pub fn write_selected_fields<T: AsRef<str>>( &mut self, line: &[T], cols: &[usize], sep: Option<&[u8]>, ) -> CliResult
pub fn write_selected_fields_unchecked<T: AsRef<str>>( &mut self, line: &[T], cols: &[usize], sep: Option<&[u8]>, )
pub fn write_fields_of_lines_unchecked<T: AsRef<str>>( &mut self, lines: &Vec<Vec<T>>, )
pub fn write_excel_field(&mut self, data: &Data) -> CliResult
pub fn write_excel_line(&mut self, line: &[Data], sep: &[u8]) -> CliResult
pub fn write_excel_line_unchecked(&mut self, line: &[Data], sep: &[u8])
pub fn write_excel_selected_fields( &mut self, line: &[Data], cols: &[usize], sep: &[u8], ) -> CliResult
pub fn write_excel_selected_fields_unchecked( &mut self, line: &[Data], cols: &[usize], sep: &[u8], )
pub fn write_excel_lines( &mut self, lines: &[Vec<Data>], sep: &[u8], ) -> CliResult
pub fn write_excel_lines_by_ref( &mut self, lines: &[&Vec<Data>], sep: &[u8], ) -> CliResult
Auto Trait Implementations§
impl Freeze for Writer
impl !RefUnwindSafe for Writer
impl !Send for Writer
impl !Sync for Writer
impl Unpin for Writer
impl !UnwindSafe for Writer
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more