pub struct AnsiConfig {
pub preserve_ansi: bool,
pub preserve_control_chars: bool,
}Expand description
Configuration for ANSI handling
Controls how ANSI escape codes and control characters are processed in command output.
Fields§
§preserve_ansi: boolWhether to preserve ANSI escape sequences in output
preserve_control_chars: boolWhether to preserve control characters in output
Implementations§
Source§impl AnsiConfig
impl AnsiConfig
Sourcepub fn process_output(&self, data: &str) -> String
pub fn process_output(&self, data: &str) -> String
Process output according to config settings
Applies the configured stripping rules to the input data.
Trait Implementations§
Source§impl Clone for AnsiConfig
impl Clone for AnsiConfig
Source§fn clone(&self) -> AnsiConfig
fn clone(&self) -> AnsiConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnsiConfig
impl Debug for AnsiConfig
Auto Trait Implementations§
impl Freeze for AnsiConfig
impl RefUnwindSafe for AnsiConfig
impl Send for AnsiConfig
impl Sync for AnsiConfig
impl Unpin for AnsiConfig
impl UnsafeUnpin for AnsiConfig
impl UnwindSafe for AnsiConfig
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> 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>
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