pub struct Range {
pub start: Position,
pub end: Position,
}Fields§
§start: Position§end: PositionImplementations§
Source§impl Range
impl Range
pub fn get_byte_range(self, text: &str) -> Option<Range<usize>>
pub fn merge(self, range: Range) -> Self
pub fn from_position(position: Position) -> Self
pub fn as_position(self) -> Position
pub fn end_as_range(self) -> Self
pub fn in_range(self, other: Self) -> bool
Trait Implementations§
impl Copy for Range
Auto Trait Implementations§
impl Freeze for Range
impl RefUnwindSafe for Range
impl Send for Range
impl Sync for Range
impl Unpin for Range
impl UnwindSafe for Range
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