pub struct Locations { /* private fields */ }Expand description
The text range of each part of a compiled map, by its location in the StructureMap
(StructureMap.group[0].rule[2].source[0], as a debug trace names it). The rules a batch
identity rule produces all point at that rule.
Implementations§
Source§impl Locations
impl Locations
Sourcepub fn range(&self, position: &str) -> Option<TextRange>
pub fn range(&self, position: &str) -> Option<TextRange>
The byte range of the part at position.
Sourcepub fn span(
&self,
text: &str,
index: &LineIndex,
position: &str,
) -> Option<Span>
pub fn span( &self, text: &str, index: &LineIndex, position: &str, ) -> Option<Span>
The rows and columns of the part at position in text, the source the map was
compiled from.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
impl Eq for Locations
impl StructuralPartialEq for Locations
Auto Trait Implementations§
impl Freeze for Locations
impl RefUnwindSafe for Locations
impl Send for Locations
impl Sync for Locations
impl Unpin for Locations
impl UnsafeUnpin for Locations
impl UnwindSafe for Locations
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> 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§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.