pub struct LeanSourceRange {
pub file: String,
pub start_line: u32,
pub start_column: u32,
pub end_line: u32,
pub end_column: u32,
}Expand description
Source range Lean recorded for a declaration.
Coordinates are 1-based at every layer, matching the public
convention of Lean declaration ranges. file is the path or module
label Lean/Rust could resolve for the declaration; it is a label for
consumers, not a normalized filesystem guarantee.
Fields§
§file: StringFile path or module label recorded for the declaration.
start_line: u321-based start line.
start_column: u321-based start column.
end_line: u321-based end line.
end_column: u321-based end column.
Trait Implementations§
Source§impl Clone for LeanSourceRange
impl Clone for LeanSourceRange
Source§fn clone(&self) -> LeanSourceRange
fn clone(&self) -> LeanSourceRange
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 LeanSourceRange
impl Debug for LeanSourceRange
Source§impl PartialEq for LeanSourceRange
impl PartialEq for LeanSourceRange
Source§fn eq(&self, other: &LeanSourceRange) -> bool
fn eq(&self, other: &LeanSourceRange) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'lean> TryFromLean<'lean> for LeanSourceRange
impl<'lean> TryFromLean<'lean> for LeanSourceRange
Source§fn try_from_lean(obj: Obj<'lean>) -> LeanResult<Self>
fn try_from_lean(obj: Obj<'lean>) -> LeanResult<Self>
Decode
obj into Self, returning a
LeanError::Host with stage
[HostStage::Conversion] if the object’s kind or payload is
outside the type’s representable range. Read moreimpl Eq for LeanSourceRange
impl StructuralPartialEq for LeanSourceRange
Auto Trait Implementations§
impl Freeze for LeanSourceRange
impl RefUnwindSafe for LeanSourceRange
impl Send for LeanSourceRange
impl Sync for LeanSourceRange
impl Unpin for LeanSourceRange
impl UnsafeUnpin for LeanSourceRange
impl UnwindSafe for LeanSourceRange
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