pub struct SourceContext {
pub file: String,
pub lineno: i64,
pub pre_context: Vec<String>,
pub context_line: String,
pub post_context: Vec<String>,
}Fields§
§file: String§lineno: i64§pre_context: Vec<String>§context_line: String§post_context: Vec<String>Implementations§
Source§impl SourceContext
impl SourceContext
Sourcepub fn pre_context_with_lines(&self) -> Vec<(i64, &str)>
pub fn pre_context_with_lines(&self) -> Vec<(i64, &str)>
Returns pre_context lines with their line numbers
Sourcepub fn post_context_with_lines(&self) -> Vec<(i64, &str)>
pub fn post_context_with_lines(&self) -> Vec<(i64, &str)>
Returns post_context lines with their line numbers
Trait Implementations§
Source§impl Clone for SourceContext
impl Clone for SourceContext
Source§fn clone(&self) -> SourceContext
fn clone(&self) -> SourceContext
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 SourceContext
impl Debug for SourceContext
Source§impl<'de> Deserialize<'de> for SourceContext
impl<'de> Deserialize<'de> for SourceContext
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
Auto Trait Implementations§
impl Freeze for SourceContext
impl RefUnwindSafe for SourceContext
impl Send for SourceContext
impl Sync for SourceContext
impl Unpin for SourceContext
impl UnsafeUnpin for SourceContext
impl UnwindSafe for SourceContext
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