pub struct EditRange<Cursor> {
pub start: Cursor,
pub end: Cursor,
pub shape: TargetShape,
pub inclusive: bool,
}Expand description
Description of a textual range within a buffer.
Fields§
§start: CursorThe start of the range.
end: CursorThe end of the range.
shape: TargetShapeThe default shape to interpret the range as. This might be overriden by EditContext::get_target_shape.
inclusive: boolWhether to include the character at the end Cursor when interpreted as a CharWise range.
Implementations§
Source§impl<Cursor: Ord> EditRange<Cursor>
impl<Cursor: Ord> EditRange<Cursor>
Sourcepub fn new(a: Cursor, b: Cursor, shape: TargetShape, inclusive: bool) -> Self
pub fn new(a: Cursor, b: Cursor, shape: TargetShape, inclusive: bool) -> Self
Create a new editing range.
Sourcepub fn inclusive(a: Cursor, b: Cursor, shape: TargetShape) -> Self
pub fn inclusive(a: Cursor, b: Cursor, shape: TargetShape) -> Self
Create a new inclusive editing range.
Sourcepub fn exclusive(a: Cursor, b: Cursor, shape: TargetShape) -> Self
pub fn exclusive(a: Cursor, b: Cursor, shape: TargetShape) -> Self
Create a new exclusive editing range.
Trait Implementations§
impl<Cursor: Eq> Eq for EditRange<Cursor>
impl<Cursor> StructuralPartialEq for EditRange<Cursor>
Auto Trait Implementations§
impl<Cursor> Freeze for EditRange<Cursor>where
Cursor: Freeze,
impl<Cursor> RefUnwindSafe for EditRange<Cursor>where
Cursor: RefUnwindSafe,
impl<Cursor> Send for EditRange<Cursor>where
Cursor: Send,
impl<Cursor> Sync for EditRange<Cursor>where
Cursor: Sync,
impl<Cursor> Unpin for EditRange<Cursor>where
Cursor: Unpin,
impl<Cursor> UnwindSafe for EditRange<Cursor>where
Cursor: UnwindSafe,
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