pub struct CodeRange {
pub start: Position,
pub end: Position,
}Expand description
A stretch of the document from start up to, and not including, end.
Fields§
§start: Position§end: PositionImplementations§
Source§impl CodeRange
impl CodeRange
pub const fn new(start: Position, end: Position) -> Self
Sourcepub const fn at(position: Position) -> Self
pub const fn at(position: Position) -> Self
The empty range at one place, which is where an insertion goes.
Sourcepub const fn of(
start_line: u32,
start_column: u32,
end_line: u32,
end_column: u32,
) -> Self
pub const fn of( start_line: u32, start_column: u32, end_line: u32, end_column: u32, ) -> Self
A range given as four numbers, in the order a language server writes them.
pub fn is_empty(&self) -> bool
Trait Implementations§
impl Copy for CodeRange
impl Eq for CodeRange
impl StructuralPartialEq for CodeRange
Auto Trait Implementations§
impl Freeze for CodeRange
impl RefUnwindSafe for CodeRange
impl Send for CodeRange
impl Sync for CodeRange
impl Unpin for CodeRange
impl UnsafeUnpin for CodeRange
impl UnwindSafe for CodeRange
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