pub struct Report {
pub check: String,
pub outcome: Outcome,
pub skipped: Option<SkipReason>,
pub status: Option<i32>,
pub details: Option<Details>,
pub attachments: Vec<Attachment>,
}Expand description
The result of one check run.
Fields§
§check: StringThe check name.
outcome: OutcomeHow the check ended.
skipped: Option<SkipReason>Why the check did not run.
status: Option<i32>The exit status of the command, when it ran.
details: Option<Details>The structured result, when a converter produced one.
attachments: Vec<Attachment>Files stored next to the report.
Implementations§
Source§impl Report
impl Report
Sourcepub fn plain(check: &str, outcome: Outcome, status: Option<i32>) -> Self
pub fn plain(check: &str, outcome: Outcome, status: Option<i32>) -> Self
A report with an outcome and an exit status and nothing else.
Sourcepub fn skipped(check: &str, reason: SkipReason) -> Self
pub fn skipped(check: &str, reason: SkipReason) -> Self
A report for a check that did not run.
Sourcepub fn attach(
&mut self,
directory: &Path,
name: &str,
file: &str,
contents: &[u8],
) -> Result<(), ReportError>
pub fn attach( &mut self, directory: &Path, name: &str, file: &str, contents: &[u8], ) -> Result<(), ReportError>
Store contents as file in directory and list it as an attachment.
The directory is created when it is missing.
§Errors
Returns an error when the directory or the file cannot be written.
Trait Implementations§
impl Eq for Report
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 UnsafeUnpin 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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.