pub struct ConsoleOptions {Show 14 fields
pub size: ConsoleDimensions,
pub is_terminal: bool,
pub encoding: String,
pub min_width: usize,
pub max_width: usize,
pub max_height: usize,
pub justify: Option<AlignMethod>,
pub overflow: Option<OverflowMethod>,
pub no_wrap: bool,
pub ascii_only: bool,
pub markup: bool,
pub highlight: bool,
pub height: Option<usize>,
pub legacy_windows: bool,
}Expand description
Options passed to renderables during rendering.
Fields§
§size: ConsoleDimensionsTerminal size.
is_terminal: boolTrue if output is a terminal.
encoding: StringThe encoding (almost always UTF-8).
min_width: usizeMinimum render width.
max_width: usizeMaximum render width.
max_height: usizeMaximum height.
justify: Option<AlignMethod>Override for text justification.
overflow: Option<OverflowMethod>Override for overflow handling.
no_wrap: boolDisable text wrapping.
ascii_only: boolIf true, use ASCII-only box characters.
markup: boolIf true, enable markup interpretation.
highlight: boolIf true, enable syntax highlighting of strings.
height: Option<usize>Optional fixed height for the renderable.
legacy_windows: boolFor legacy Windows console.
Implementations§
Source§impl ConsoleOptions
impl ConsoleOptions
Sourcepub fn update_width(&self, max_width: usize) -> Self
pub fn update_width(&self, max_width: usize) -> Self
Update the max width.
Sourcepub fn update_height(&self, height: usize) -> Self
pub fn update_height(&self, height: usize) -> Self
Update the height.
Sourcepub fn shrink_width(&self, amount: usize) -> Self
pub fn shrink_width(&self, amount: usize) -> Self
Shrink the max width by an amount (for padding).
Trait Implementations§
Source§impl Clone for ConsoleOptions
impl Clone for ConsoleOptions
Source§fn clone(&self) -> ConsoleOptions
fn clone(&self) -> ConsoleOptions
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 ConsoleOptions
impl Debug for ConsoleOptions
Auto Trait Implementations§
impl Freeze for ConsoleOptions
impl RefUnwindSafe for ConsoleOptions
impl Send for ConsoleOptions
impl Sync for ConsoleOptions
impl Unpin for ConsoleOptions
impl UnsafeUnpin for ConsoleOptions
impl UnwindSafe for ConsoleOptions
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