pub struct EditSet { /* private fields */ }Expand description
Collection of edits that can be applied together
Implementations§
Source§impl EditSet
impl EditSet
Sourcepub fn apply_to_position(&self, pos: Position) -> Option<Position>
pub fn apply_to_position(&self, pos: Position) -> Option<Position>
Apply all edits to a position
Sourcepub fn apply_to_range(&self, range: Range) -> Option<Range>
pub fn apply_to_range(&self, range: Range) -> Option<Range>
Apply all edits to a range
Sourcepub fn affects_range(&self, range: &Range) -> bool
pub fn affects_range(&self, range: &Range) -> bool
Check if a range is affected by any edit
Sourcepub fn byte_shift_at(&self, byte: usize) -> isize
pub fn byte_shift_at(&self, byte: usize) -> isize
Get the total byte shift at a given position
Sourcepub fn affected_ranges(&self) -> Vec<Range>
pub fn affected_ranges(&self) -> Vec<Range>
Get all ranges affected by the edits
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EditSet
impl RefUnwindSafe for EditSet
impl Send for EditSet
impl Sync for EditSet
impl Unpin for EditSet
impl UnsafeUnpin for EditSet
impl UnwindSafe for EditSet
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