pub struct SourceSpan {
pub file: PathBuf,
pub start_line: usize,
pub start_column: usize,
pub start_byte: Option<usize>,
pub end_line: usize,
pub end_column: usize,
pub end_byte: Option<usize>,
}Fields§
§file: PathBuf§start_line: usize§start_column: usize§start_byte: Option<usize>§end_line: usize§end_column: usize§end_byte: Option<usize>Implementations§
Source§impl SourceSpan
impl SourceSpan
pub fn has_same_coordinates(&self, other: &Self) -> bool
pub fn contains(&self, other: &Self) -> bool
pub fn overlaps(&self, other: &Self) -> bool
Sourcepub fn extent(&self) -> usize
pub fn extent(&self) -> usize
Stable source-order size used for choosing the tightest enclosing span.
pub fn start_distance(&self, other: &Self) -> usize
pub fn boundary_distance(&self, other: &Self) -> usize
Trait Implementations§
Source§impl Clone for SourceSpan
impl Clone for SourceSpan
Source§impl Debug for SourceSpan
impl Debug for SourceSpan
Source§impl<'de> Deserialize<'de> for SourceSpan
impl<'de> Deserialize<'de> for SourceSpan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SourceSpan
Source§impl PartialEq for SourceSpan
impl PartialEq for SourceSpan
Source§impl Serialize for SourceSpan
impl Serialize for SourceSpan
impl StructuralPartialEq for SourceSpan
Auto Trait Implementations§
impl DynSend for SourceSpan
impl DynSync for SourceSpan
impl Freeze for SourceSpan
impl RefUnwindSafe for SourceSpan
impl Send for SourceSpan
impl Sync for SourceSpan
impl Unpin for SourceSpan
impl UnsafeUnpin for SourceSpan
impl UnwindSafe for SourceSpan
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