Enum biome_formatter::LineEnding
source · pub enum LineEnding {
Lf,
Crlf,
Cr,
}
Variants§
Lf
Line Feed only (\n), common on Linux and macOS as well as inside git repos
Crlf
Carriage Return + Line Feed characters (\r\n), common on Windows
Cr
Carriage Return character only (\r), used very rarely
Implementations§
source§impl LineEnding
impl LineEnding
pub const fn as_str(&self) -> &'static str
sourcepub const fn is_line_feed(&self) -> bool
pub const fn is_line_feed(&self) -> bool
Returns true
if this is a LineEnding::Lf.
sourcepub const fn is_carriage_return_line_feed(&self) -> bool
pub const fn is_carriage_return_line_feed(&self) -> bool
Returns true
if this is a LineEnding::Crlf.
sourcepub const fn is_carriage_return(&self) -> bool
pub const fn is_carriage_return(&self) -> bool
Returns true
if this is a LineEnding::Cr.
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 Deserializable for LineEnding
impl Deserializable for LineEnding
source§fn deserialize(
value: &impl DeserializableValue,
name: &str,
diagnostics: &mut Vec<DeserializationDiagnostic>
) -> Option<Self>
fn deserialize( value: &impl DeserializableValue, name: &str, diagnostics: &mut Vec<DeserializationDiagnostic> ) -> Option<Self>
Returns the deserialized form of
value
, or None
if it failed.
Any diagnostics emitted during deserialization are appended to diagnostics
.
name
corresponds to the name used in a diagnostic to designate the deserialized value.source§impl Display for LineEnding
impl Display for LineEnding
source§impl FromStr for LineEnding
impl FromStr for LineEnding
source§impl Hash for LineEnding
impl Hash for LineEnding
source§impl Merge for LineEnding
impl Merge for LineEnding
source§fn merge_with(&mut self, other: Self)
fn merge_with(&mut self, other: Self)
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 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.