pub enum WrapOptions<'a> {
NoWrap,
WrapAt(usize),
WrapAtWith(usize, &'a str),
}Expand description
Line Wrapping Options.
Used with encode and encode_buf. See them for examples.
Unless you want to specify a custom end-of-line string, use an
Option::None instead for no wrapping or an usize instead for
wrapping at a column boundary, and everything will magically work.
Variants§
NoWrap
Don’t wrap lines at all
WrapAt(usize)
Wrap every so many columns with ‘\n’. The length must be > 0.
WrapAtWith(usize, &'a str)
Wrap every so many columns with a specified string. The length must be > 0.
Trait Implementations§
Source§impl<'a> Clone for WrapOptions<'a>
impl<'a> Clone for WrapOptions<'a>
Source§fn clone(&self) -> WrapOptions<'a>
fn clone(&self) -> WrapOptions<'a>
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<'a> Debug for WrapOptions<'a>
impl<'a> Debug for WrapOptions<'a>
Source§impl<'a, T> From<T> for WrapOptions<'a>
impl<'a, T> From<T> for WrapOptions<'a>
Source§impl<'a> Hash for WrapOptions<'a>
impl<'a> Hash for WrapOptions<'a>
Source§impl<'a> PartialEq for WrapOptions<'a>
impl<'a> PartialEq for WrapOptions<'a>
impl<'a> Copy for WrapOptions<'a>
impl<'a> Eq for WrapOptions<'a>
impl<'a> StructuralPartialEq for WrapOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for WrapOptions<'a>
impl<'a> RefUnwindSafe for WrapOptions<'a>
impl<'a> Send for WrapOptions<'a>
impl<'a> Sync for WrapOptions<'a>
impl<'a> Unpin for WrapOptions<'a>
impl<'a> UnwindSafe for WrapOptions<'a>
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