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§
source§impl 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§
source§impl Clone for LineEnding
impl Clone for LineEnding
source§fn clone(&self) -> LineEnding
fn clone(&self) -> LineEnding
Returns a copy 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 more