pub struct Config {Show 29 fields
pub list: ListOptions,
pub output: OutputMode,
pub color: ColorWhen,
pub human_sizes: bool,
pub si_sizes: bool,
pub icons: bool,
pub classify: bool,
pub indicator: IndicatorStyle,
pub terminal_width: usize,
pub is_stdout_tty: bool,
pub show_owner: bool,
pub show_group: bool,
pub numeric_uid_gid: bool,
pub show_inode: bool,
pub show_blocks: bool,
pub full_time: bool,
pub show_git: bool,
pub quoting_style: QuotingStyle,
pub control_chars: ControlChars,
pub show_author: bool,
pub block_size: BlockSize,
pub kibibytes: bool,
pub tabsize: usize,
pub hyperlink: HyperlinkWhen,
pub show_context: bool,
pub zero: bool,
pub dired: bool,
pub time_style: TimeStyle,
pub emit_block_total: bool,
}Expand description
Full runtime configuration combining listing and presentation.
Fields§
§list: ListOptions§output: OutputMode§color: ColorWhen§human_sizes: bool§si_sizes: boolSI units (powers of 1000) instead of 1024 (--si).
icons: bool§classify: bool§indicator: IndicatorStyle§terminal_width: usizeTerminal width used for multi-column layout (-w); 0 means unlimited.
is_stdout_tty: bool§show_owner: bool§show_group: bool§numeric_uid_gid: bool§show_inode: bool§show_blocks: bool§full_time: bool§show_git: boolWhen true, suppress git decorations in format (also controlled by CLI).
quoting_style: QuotingStyleFilename quoting style.
control_chars: ControlCharsControl-character handling for names.
Show author column in long format (--author); usually same as owner.
block_size: BlockSizeBlock size for size/-s display.
kibibytes: boolForce 1024-byte blocks for -s (-k / --kibibytes).
tabsize: usizeTab stop size (-T / --tabsize); stored for future column layout.
hyperlink: HyperlinkWhenOSC 8 hyperlinks for file names.
show_context: boolShow SELinux security context (-Z).
zero: boolUse NUL as line terminator (--zero).
dired: boolEmacs dired mode (-D / --dired).
time_style: TimeStyleLong-listing time style.
emit_block_total: boolPrint GNU total N before directory content listings (-l / -s).
False when listing a single non-directory operand (or -d on a dir).
Implementations§
Source§impl Config
impl Config
pub fn color_enabled(&self) -> bool
pub fn hyperlink_enabled(&self) -> bool
Sourcepub fn effective_output(&self) -> OutputMode
pub fn effective_output(&self) -> OutputMode
Resolve default output mode: multi-column on TTY, one-per-line otherwise.
pub fn indicator_style(&self) -> IndicatorStyle
Sourcepub fn blocks_unit(&self) -> u64
pub fn blocks_unit(&self) -> u64
Effective block size for allocated-size display (-s).
GNU coreutils defaults to 1024-byte units for -s (and -k forces
that). A bare --block-size=1 / default long-size unit of 1 byte must
not be reused for -s (that produced wild totals like 4096 for a
4KiB file). POSIXLY_CORRECT selects 512-byte units.
Sourcepub fn line_ending(&self) -> &'static str
pub fn line_ending(&self) -> &'static str
Line terminator (newline or NUL).
Sourcepub fn hide_control_chars(&self) -> bool
pub fn hide_control_chars(&self) -> bool
Whether control characters should be replaced with ?.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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