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 moresource§impl Debug for LineEnding
impl Debug for LineEnding
source§impl PartialEq for LineEnding
impl PartialEq for LineEnding
impl Copy for LineEnding
impl Eq for LineEnding
impl StructuralPartialEq for LineEnding
Auto Trait Implementations§
impl Freeze for LineEnding
impl RefUnwindSafe for LineEnding
impl Send for LineEnding
impl Sync for LineEnding
impl Unpin for LineEnding
impl UnwindSafe for LineEnding
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)