pub struct SourceRef(pub (usize, usize), pub (usize, usize));Expand description
SourceRef((line_start, character_start), (line_end, character_end))
inclusive character_start, exclusive character_end
Tuple Fields§
§0: (usize, usize)§1: (usize, usize)Implementations§
Source§impl SourceRef
impl SourceRef
pub fn with_char_end(&self, end: (usize, usize)) -> SourceRef
pub fn up_to(&self, other: SourceRef) -> SourceRef
pub fn up_to_end_of(&self, other: SourceRef) -> SourceRef
pub fn up_to_next_line(self) -> SourceRef
pub fn contains(&self, SourceRef: SourceRef) -> bool
pub fn line_start(&self) -> usize
Trait Implementations§
Source§impl Ord for SourceRef
impl Ord for SourceRef
Source§impl PartialOrd for SourceRef
impl PartialOrd for SourceRef
impl Copy for SourceRef
impl Eq for SourceRef
impl StructuralPartialEq for SourceRef
Auto Trait Implementations§
impl Freeze for SourceRef
impl RefUnwindSafe for SourceRef
impl Send for SourceRef
impl Sync for SourceRef
impl Unpin for SourceRef
impl UnwindSafe for SourceRef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.