pub struct SyntaxLocation {
pub line: usize,
pub column: usize,
}Expand description
A position inside a parsed source file, one-based in both axes. 已解析源文件里的位置,两个轴都从 1 开始。
Fields§
§line: usizeOne-based line number. 从 1 开始的行号。
column: usizeOne-based column number, counted in characters. 从 1 开始的列号,按字符计。
Trait Implementations§
Source§impl Clone for SyntaxLocation
impl Clone for SyntaxLocation
Source§fn clone(&self) -> SyntaxLocation
fn clone(&self) -> SyntaxLocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SyntaxLocation
impl Debug for SyntaxLocation
impl Eq for SyntaxLocation
Source§impl PartialEq for SyntaxLocation
impl PartialEq for SyntaxLocation
impl StructuralPartialEq for SyntaxLocation
Auto Trait Implementations§
impl Freeze for SyntaxLocation
impl RefUnwindSafe for SyntaxLocation
impl Send for SyntaxLocation
impl Sync for SyntaxLocation
impl Unpin for SyntaxLocation
impl UnsafeUnpin for SyntaxLocation
impl UnwindSafe for SyntaxLocation
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