Struct badder_lang::SourceRef
source · 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 PartialEq for SourceRef
impl PartialEq for SourceRef
source§impl PartialOrd for SourceRef
impl PartialOrd for SourceRef
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for SourceRef
impl Eq for SourceRef
impl StructuralPartialEq for SourceRef
Auto Trait Implementations§
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<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.