Struct yash_syntax::source::Location
source · pub struct Location {
pub code: Rc<Code>,
pub range: Range<usize>,
}
Expand description
Position of source code.
Fields§
§code: Rc<Code>
Code that contains the character.
range: Range<usize>
Character position in the code, counted from 0.
Characters are counted in the number of Unicode scalar values, not
bytes. That means the index should be between 0 and
code.value.borrow().chars().count()
.
Implementations§
Trait Implementations§
source§impl PartialEq for Location
impl PartialEq for Location
impl Eq for Location
impl StructuralEq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl !RefUnwindSafe for Location
impl !Send for Location
impl !Sync for Location
impl Unpin for Location
impl !UnwindSafe for Location
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