pub struct WrapOptions {
pub width: usize,
pub mode: WrapMode,
pub preserve_indent: bool,
pub trim_trailing: bool,
}Expand description
Options for text wrapping.
Fields§
§width: usizeMaximum width in cells.
mode: WrapModeWrapping mode.
preserve_indent: boolPreserve leading whitespace on continued lines.
trim_trailing: boolTrim trailing whitespace from wrapped lines.
Implementations§
Source§impl WrapOptions
impl WrapOptions
Sourcepub fn preserve_indent(self, preserve: bool) -> Self
pub fn preserve_indent(self, preserve: bool) -> Self
Set whether to preserve indentation.
Sourcepub fn trim_trailing(self, trim: bool) -> Self
pub fn trim_trailing(self, trim: bool) -> Self
Set whether to trim trailing whitespace.
Trait Implementations§
Source§impl Clone for WrapOptions
impl Clone for WrapOptions
Source§fn clone(&self) -> WrapOptions
fn clone(&self) -> WrapOptions
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 WrapOptions
impl Debug for WrapOptions
Auto Trait Implementations§
impl Freeze for WrapOptions
impl RefUnwindSafe for WrapOptions
impl Send for WrapOptions
impl Sync for WrapOptions
impl Unpin for WrapOptions
impl UnsafeUnpin for WrapOptions
impl UnwindSafe for WrapOptions
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