pub struct Report { /* private fields */ }Expand description
Implementations§
Source§impl Report
Properties
impl Report
Properties
Sourcepub fn properties(properties: Vec<(String, String)>) -> Vec<ColoredString>
pub fn properties(properties: Vec<(String, String)>) -> Vec<ColoredString>
Sourcepub fn add_properties(&mut self, properties: Vec<(String, String)>)
pub fn add_properties(&mut self, properties: Vec<(String, String)>)
Adds the properties entry.
See Report::properties.
Sourcepub fn with_properties(self, properties: Vec<(String, String)>) -> Self
pub fn with_properties(self, properties: Vec<(String, String)>) -> Self
Adds the properties entry.
See Report::properties.
Source§impl Report
Entries
impl Report
Entries
Sourcepub fn with_entry<E>(self, entry: E) -> Self
pub fn with_entry<E>(self, entry: E) -> Self
Adds the entry.
Source§impl Report
Token Info
impl Report
Token Info
Sourcepub fn token_info(
file_name: &str,
line: usize,
position: usize,
line_text: &str,
token_len: usize,
severity: Severity,
message: &str,
) -> Vec<ColoredString>
pub fn token_info( file_name: &str, line: usize, position: usize, line_text: &str, token_len: usize, severity: Severity, message: &str, ) -> Vec<ColoredString>
Generates the token info entry.
§Note
The line is the 1-indexed line number.
The position is the 0-indexed line position of the first byte within the line_text.
The token_len is the number of chars or slots on a monospaced display.
§Display
--> the/file/name.ext
|
8 | the line text
| ^^^^ the message
|Trait Implementations§
Auto Trait Implementations§
impl Freeze for Report
impl RefUnwindSafe for Report
impl Send for Report
impl Sync for Report
impl Unpin for Report
impl UnwindSafe for Report
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