pub struct FileTreePrinter { /* private fields */ }Expand description
Stateful printer for streaming file output with proper indentation. Tracks the current directory path and emits directory headers when needed.
Implementations§
Source§impl FileTreePrinter
impl FileTreePrinter
pub fn new() -> Self
Sourcepub fn format_file(&mut self, file: &FileInfo) -> String
pub fn format_file(&mut self, file: &FileInfo) -> String
Format a file with proper indentation, emitting directory headers as needed. Returns a string that may contain multiple lines (directory headers + file).
pub fn format_excluded_dir(&mut self, path: &str) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileTreePrinter
impl RefUnwindSafe for FileTreePrinter
impl Send for FileTreePrinter
impl Sync for FileTreePrinter
impl Unpin for FileTreePrinter
impl UnsafeUnpin for FileTreePrinter
impl UnwindSafe for FileTreePrinter
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