Enum uucore::line_ending::LineEnding
source · #[repr(u8)]pub enum LineEnding {
Newline = 10,
Nul = 0,
}
Expand description
Line ending of either \n
or \0
Used by various utilities that have the option to separate lines by nul
characters instead of \n
. Usually, this is specified with the -z
or
--zero
flag.
The Display
implementation writes the character corresponding to the
variant to the formatter.
Variants§
Implementations§
source§impl LineEnding
impl LineEnding
sourcepub fn from_zero_flag(is_zero_terminated: bool) -> Self
pub fn from_zero_flag(is_zero_terminated: bool) -> Self
Create a LineEnding
from a -z
/--zero
flag
If is_zero_terminated
is true, LineEnding::Nul
is returned,
otherwise LineEnding::Newline
.
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 Default for LineEnding
impl Default for LineEnding
source§fn default() -> LineEnding
fn default() -> LineEnding
Returns the “default value” for a type. Read more
source§impl Display for LineEnding
impl Display for LineEnding
source§impl From<LineEnding> for u8
impl From<LineEnding> for u8
source§fn from(line_ending: LineEnding) -> Self
fn from(line_ending: LineEnding) -> Self
Converts to this type from the input type.
source§impl PartialEq for LineEnding
impl PartialEq for LineEnding
source§fn eq(&self, other: &LineEnding) -> bool
fn eq(&self, other: &LineEnding) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy 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