pub enum WhiteSpaceMode {
Normal,
Pre,
PreWrap,
PreLine,
NoWrap,
}Expand description
CSS-like white-space property controlling wrapping and whitespace handling.
Maps CSS white-space modes to terminal text behavior.
Variants§
Normal
Collapse whitespace runs, wrap at container width (CSS normal).
Pre
Preserve all whitespace and newlines, no wrapping (CSS pre).
PreWrap
Preserve whitespace and newlines, wrap at container width (CSS pre-wrap).
PreLine
Collapse whitespace runs, preserve newlines, wrap (CSS pre-line).
NoWrap
Collapse whitespace, suppress wrapping (CSS nowrap).
Implementations§
Source§impl WhiteSpaceMode
impl WhiteSpaceMode
Sourcepub const fn collapses_whitespace(self) -> bool
pub const fn collapses_whitespace(self) -> bool
Whether this mode collapses consecutive whitespace to a single space.
Sourcepub const fn allows_wrap(self) -> bool
pub const fn allows_wrap(self) -> bool
Whether this mode allows line wrapping at container width.
Sourcepub const fn preserves_newlines(self) -> bool
pub const fn preserves_newlines(self) -> bool
Whether this mode preserves explicit newlines in the source.
Trait Implementations§
Source§impl Clone for WhiteSpaceMode
impl Clone for WhiteSpaceMode
Source§fn clone(&self) -> WhiteSpaceMode
fn clone(&self) -> WhiteSpaceMode
Returns a duplicate of the value. Read more
1.0.0 · 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 WhiteSpaceMode
impl Debug for WhiteSpaceMode
Source§impl Default for WhiteSpaceMode
impl Default for WhiteSpaceMode
Source§fn default() -> WhiteSpaceMode
fn default() -> WhiteSpaceMode
Returns the “default value” for a type. Read more
Source§impl Hash for WhiteSpaceMode
impl Hash for WhiteSpaceMode
Source§impl PartialEq for WhiteSpaceMode
impl PartialEq for WhiteSpaceMode
impl Copy for WhiteSpaceMode
impl Eq for WhiteSpaceMode
impl StructuralPartialEq for WhiteSpaceMode
Auto Trait Implementations§
impl Freeze for WhiteSpaceMode
impl RefUnwindSafe for WhiteSpaceMode
impl Send for WhiteSpaceMode
impl Sync for WhiteSpaceMode
impl Unpin for WhiteSpaceMode
impl UnsafeUnpin for WhiteSpaceMode
impl UnwindSafe for WhiteSpaceMode
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