#[non_exhaustive]pub struct Report {
pub diagnostics: Vec<Diagnostic>,
}Expand description
Everything a build found, in the order found.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.diagnostics: Vec<Diagnostic>The diagnostics.
Implementations§
Source§impl Report
impl Report
Sourcepub fn push(&mut self, diagnostic: Diagnostic)
pub fn push(&mut self, diagnostic: Diagnostic)
Adds a diagnostic, unless its level is Level::Allow.
Sourcepub fn failing_locales(&self) -> BTreeSet<&str>
pub fn failing_locales(&self) -> BTreeSet<&str>
The locales that have an error.
Sourcepub fn to_text(&self) -> String
pub fn to_text(&self) -> String
One line per diagnostic, sorted by file and position so that two runs of a build print the same thing.
Sourcepub fn to_cargo_lines(&self) -> String
pub fn to_cargo_lines(&self) -> String
The cargo instructions a build.rs prints for its report:
cargo::error= for an error, cargo::warning= for the rest.
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 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<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more