pub struct ContextSpan {
pub file: Option<String>,
pub lines: [u32; 2],
}Expand description
A span of source — a file plus an inclusive line range.
Fields§
§file: Option<String>File path; absent for synthetic / REPL.
lines: [u32; 2]Inclusive 1-based line range [start, end].
Trait Implementations§
Source§impl Clone for ContextSpan
impl Clone for ContextSpan
Source§fn clone(&self) -> ContextSpan
fn clone(&self) -> ContextSpan
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 ContextSpan
impl Debug for ContextSpan
Source§impl<'de> Deserialize<'de> for ContextSpan
impl<'de> Deserialize<'de> for ContextSpan
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
Source§impl PartialEq for ContextSpan
impl PartialEq for ContextSpan
Source§fn eq(&self, other: &ContextSpan) -> bool
fn eq(&self, other: &ContextSpan) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ContextSpan
impl Serialize for ContextSpan
impl Eq for ContextSpan
impl StructuralPartialEq for ContextSpan
Auto Trait Implementations§
impl Freeze for ContextSpan
impl RefUnwindSafe for ContextSpan
impl Send for ContextSpan
impl Sync for ContextSpan
impl Unpin for ContextSpan
impl UnsafeUnpin for ContextSpan
impl UnwindSafe for ContextSpan
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