pub struct Report {
pub output: CommandOutput,
pub lines: Vec<Line>,
pub stats: Stats,
pub suggest_backtrace: bool,
pub failure_keys: Vec<String>,
pub analyzer_exports: HashMap<String, String>,
pub has_passed_tests: bool,
pub dismissed_items: usize,
pub dismissed_lines: Vec<Line>,
}Expand description
the usable content of cargo watch’s output, lightly analyzed
Fields§
§output: CommandOutput§lines: Vec<Line>§stats: Stats§suggest_backtrace: bool§failure_keys: Vec<String>§analyzer_exports: HashMap<String, String>the exports that the analyzers have done, by name
has_passed_tests: bool§dismissed_items: usize§dismissed_lines: Vec<Line>Implementations§
Source§impl Report
impl Report
pub fn new(lines: Vec<Line>) -> Self
pub fn lines_changed(&mut self)
Sourcepub fn reverse(&mut self)
pub fn reverse(&mut self)
change the order of the lines so that items are in reverse order (but keep the order of lines of a given item)
Sourcepub fn is_success(&self, allow_warnings: bool, allow_failures: bool) -> bool
pub fn is_success(&self, allow_warnings: bool, allow_failures: bool) -> bool
A successful report is one with nothing to tell: no warning, no error, no test failure
pub fn remove_item(&mut self, item_idx: usize)
pub fn has_dismissed_items(&self) -> bool
pub fn focus_file(&mut self, ffc: &FocusFileCommand)
pub fn top_item_idx(&self) -> Option<usize>
pub fn item_location(&self, item_idx: usize) -> Option<&str>
pub fn item_diag_type(&self, item_idx: usize) -> Option<&str>
Sourcepub fn write_locations<W: Write>(
&self,
w: &mut W,
mission: &Mission<'_>,
line_format: &str,
) -> Result<(), Error>
pub fn write_locations<W: Write>( &self, w: &mut W, mission: &Mission<'_>, line_format: &str, ) -> Result<(), Error>
export the report in a file, as the “locations” format
pub fn can_scope_tests(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Report
impl<'de> Deserialize<'de> for Report
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 StructuralPartialEq for Report
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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