pub struct TextOutput<'a> { /* private fields */ }Expand description
Text output implementation that formats entries for terminal display.
This is the default output sink used by list for standard ls behavior.
It handles all text formatting including colors, columns, long format, etc.
Implementations§
Trait Implementations§
Source§impl LsOutput for TextOutput<'_>
impl LsOutput for TextOutput<'_>
Source§fn write_entries(
&mut self,
entries: &[PathData<'_>],
config: &Config,
) -> UResult<()>
fn write_entries( &mut self, entries: &[PathData<'_>], config: &Config, ) -> UResult<()>
Called with a batch of entries for a directory. Read more
Source§fn write_dir_header(
&mut self,
path_data: &PathData<'_>,
config: &Config,
is_first: bool,
) -> UResult<()>
fn write_dir_header( &mut self, path_data: &PathData<'_>, config: &Config, is_first: bool, ) -> UResult<()>
Called when entering a directory (for recursive listings or multiple arguments). Read more
Source§fn write_total(&mut self, total_size: u64, config: &Config) -> UResult<()>
fn write_total(&mut self, total_size: u64, config: &Config) -> UResult<()>
Called to report the total blocks for a directory in long format. Read more
Source§fn flush(&mut self) -> UResult<()>
fn flush(&mut self) -> UResult<()>
Called to flush any buffered output (e.g., before error messages).
Source§fn finalize(&mut self, config: &Config) -> UResult<()>
fn finalize(&mut self, config: &Config) -> UResult<()>
Called when all entries have been written. Read more
Source§fn initialize(&mut self, _config: &Config) -> UResult<()>
fn initialize(&mut self, _config: &Config) -> UResult<()>
Called at the start of listing, before any entries are processed. Read more
Source§fn stream_mode(&self) -> StreamMode
fn stream_mode(&self) -> StreamMode
Returns the preferred output mode for this sink. Read more
Auto Trait Implementations§
impl<'a> Freeze for TextOutput<'a>
impl<'a> RefUnwindSafe for TextOutput<'a>
impl<'a> Send for TextOutput<'a>
impl<'a> Sync for TextOutput<'a>
impl<'a> Unpin for TextOutput<'a>
impl<'a> UnsafeUnpin for TextOutput<'a>
impl<'a> UnwindSafe for TextOutput<'a>
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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