pub struct RangeMapper { /* private fields */ }Implementations§
Source§impl RangeMapper
impl RangeMapper
pub fn add(&mut self, text: &str, source_range: TextRange)
pub fn add_unmapped(&mut self, text: &str)
pub fn take_text(&mut self) -> String
pub fn map_range_up( &self, range: TextRange, ) -> impl Iterator<Item = TextRange> + '_
pub fn map_offset_down(&self, offset: TextSize) -> Option<TextSize>
Trait Implementations§
Source§impl Default for RangeMapper
impl Default for RangeMapper
Source§fn default() -> RangeMapper
fn default() -> RangeMapper
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RangeMapper
impl RefUnwindSafe for RangeMapper
impl Send for RangeMapper
impl Sync for RangeMapper
impl Unpin for RangeMapper
impl UnwindSafe for RangeMapper
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
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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