pub struct Line {
pub item_idx: usize,
pub line_type: LineType,
pub content: TLine,
}Expand description
A report line
Fields§
§item_idx: usizethe index among items (all lines having the same index belong to the same error, warning, or test item, or just the same unclassified soup)
line_type: LineType§content: TLineImplementations§
Source§impl Line
impl Line
Sourcepub fn title_message(&self) -> Option<&str>
pub fn title_message(&self) -> Option<&str>
If the line is a title, get its message
pub fn matches(&self, summary: bool) -> bool
Sourcepub fn location(&self) -> Option<&str>
pub fn location(&self) -> Option<&str>
Return the location as given by the command
It’s usually relative and may contain the line and column
Sourcepub fn diag_type(&self) -> Option<&str>
pub fn diag_type(&self) -> Option<&str>
Try to guess the kind of diagnostic (eg “unused_variable”)
Might be moved to the Analyzer trait in the future to support tools expressing their diagnostics in a different way.
Sourcepub fn location_path(&self, mission: &Mission<'_>) -> Option<PathBuf>
pub fn location_path(&self, mission: &Mission<'_>) -> Option<PathBuf>
Return the absolute path to the error/warning/test location
pub fn is_continuation(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Line
impl<'de> Deserialize<'de> for Line
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 From<CommandOutputLine> for Line
impl From<CommandOutputLine> for Line
Source§fn from(col: CommandOutputLine) -> Self
fn from(col: CommandOutputLine) -> Self
Converts to this type from the input type.
impl Eq for Line
impl StructuralPartialEq for Line
Auto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IQ for Twhere
T: Serialize,
impl<T> IQ for Twhere
T: Serialize,
Source§fn extract_primitive<P>(&self, path: P) -> Option<String>where
P: IqPath,
fn extract_primitive<P>(&self, path: P) -> Option<String>where
P: IqPath,
Extract a “primitive” value (including strings, simple enum variants, etc)
as a string using the Display implementation of the deep value.
Source§fn extract_json_pretty<P>(&self, path: P) -> Option<String>where
P: IqPath,
fn extract_json_pretty<P>(&self, path: P) -> Option<String>where
P: IqPath,
Extract a value as JSON, pretty
Source§fn extract_value<P, V>(&self, path: P) -> Result<Option<V>, IqError>where
P: IqPath,
V: DeserializeOwned,
fn extract_value<P, V>(&self, path: P) -> Result<Option<V>, IqError>where
P: IqPath,
V: DeserializeOwned,
Extract a value in a type which must implement
Deserialize, from a value, at
the given path. Read more