pub enum LineEnding {
CrLf,
Lf,
}
Variants§
Implementations§
Source§impl LineEnding
impl LineEnding
Sourcepub fn normalize(self, text: &Rope) -> Rope
pub fn normalize(self, text: &Rope) -> Rope
Replace the line endings (\n
, \r\n
, \r
) used in text
with the line ending named by
self
.
pub fn normalize_delta(self, text: &Rope) -> Option<RopeDelta>
Sourcepub fn normalize_limited(self, text: &Rope) -> Rope
pub fn normalize_limited(self, text: &Rope) -> Rope
Only replace the carriage return line-endings.
pub fn get_chars(&self) -> &'static str
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 Hash for LineEnding
impl Hash 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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more