pub enum TextRange {
Range {
start: TextPoint,
end: TextPoint,
},
Empty,
}Variants§
Implementations§
Source§impl TextRange
impl TextRange
pub fn from_point(point: TextPoint) -> Self
pub fn new(start: TextPoint, end: TextPoint) -> Self
pub fn join(self, other: Self) -> Self
pub fn meet(self, other: Self) -> Self
pub fn start(&self) -> Option<TextPoint>
pub fn end(&self) -> Option<TextPoint>
pub fn is_empty(&self) -> bool
pub fn is_point(&self) -> bool
pub fn size(&self) -> Option<usize>
Trait Implementations§
impl Copy for TextRange
impl Eq for TextRange
Source§impl RangeBounds<TextPoint> for TextRange
transforming range a..b of two text points interpretable as
text range into the two endpoints a, b
impl RangeBounds<TextPoint> for TextRange
transforming range a..b of two text points interpretable as text range into the two endpoints a, b
impl StructuralPartialEq for TextRange
Auto Trait Implementations§
impl Freeze for TextRange
impl RefUnwindSafe for TextRange
impl Send for TextRange
impl Sync for TextRange
impl Unpin for TextRange
impl UnsafeUnpin for TextRange
impl UnwindSafe for TextRange
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