Enum textwrap::LineEnding
source · [−]pub enum LineEnding {
CRLF,
LF,
}
Expand description
Supported line endings. Like in the Rust standard library, two line
endings are supported: \r\n
and \n
Variants
CRLF
Carriage return and line feed – a line ending sequence
historically used in Windows. Corresponds to the sequence
of ASCII control characters 0x0D 0x0A
or \r\n
LF
Line feed – a line ending historically used in Unix.
Corresponds to the ASCII control character 0x0A
or \n
Implementations
sourceimpl LineEnding
impl LineEnding
sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
Turns this LineEnding
value into its ASCII representation.
Trait Implementations
sourceimpl Clone for LineEnding
impl Clone for LineEnding
sourcefn clone(&self) -> LineEnding
fn clone(&self) -> LineEnding
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for LineEnding
impl Debug for LineEnding
sourceimpl PartialEq<LineEnding> for LineEnding
impl PartialEq<LineEnding> for LineEnding
sourcefn eq(&self, other: &LineEnding) -> bool
fn eq(&self, other: &LineEnding) -> bool
impl Copy for LineEnding
impl Eq for LineEnding
impl StructuralEq for LineEnding
impl StructuralPartialEq for LineEnding
Auto Trait Implementations
impl RefUnwindSafe for LineEnding
impl Send for LineEnding
impl Sync for LineEnding
impl Unpin for LineEnding
impl UnwindSafe for LineEnding
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more