Struct yash_syntax::source::Location
source · [−]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
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more