pub enum NewlineBehavior {
Preserve,
EnsureTrailingNewline,
StripTrailingNewline,
}Expand description
Primitive newline policy for text output.
Variants§
Preserve
Preserve the input exactly.
EnsureTrailingNewline
Ensure the output ends with \n.
StripTrailingNewline
Remove trailing \r and \n characters.
Trait Implementations§
Source§impl Clone for NewlineBehavior
impl Clone for NewlineBehavior
Source§fn clone(&self) -> NewlineBehavior
fn clone(&self) -> NewlineBehavior
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 NewlineBehavior
impl Debug for NewlineBehavior
Source§impl Hash for NewlineBehavior
impl Hash for NewlineBehavior
Source§impl PartialEq for NewlineBehavior
impl PartialEq for NewlineBehavior
Source§fn eq(&self, other: &NewlineBehavior) -> bool
fn eq(&self, other: &NewlineBehavior) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for NewlineBehavior
impl Eq for NewlineBehavior
impl StructuralPartialEq for NewlineBehavior
Auto Trait Implementations§
impl Freeze for NewlineBehavior
impl RefUnwindSafe for NewlineBehavior
impl Send for NewlineBehavior
impl Sync for NewlineBehavior
impl Unpin for NewlineBehavior
impl UnsafeUnpin for NewlineBehavior
impl UnwindSafe for NewlineBehavior
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