pub struct ReportBuilder { /* private fields */ }
Expand description
A type used to build a Report
.
Implementations§
Source§impl ReportBuilder
impl ReportBuilder
Sourcepub fn with_code(self, code: usize) -> Self
pub fn with_code(self, code: usize) -> Self
Give this report a numerical code that may be used to more precisely look up the error in documentation.
Sourcepub fn set_message<M: ToString>(&mut self, message: M)
pub fn set_message<M: ToString>(&mut self, message: M)
Set the message of this report.
Sourcepub fn with_message<M: ToString>(self, message: M) -> Self
pub fn with_message<M: ToString>(self, message: M) -> Self
Add a message to this report.
Sourcepub fn add_labels<L: IntoIterator<Item = Label>>(&mut self, labels: L)
pub fn add_labels<L: IntoIterator<Item = Label>>(&mut self, labels: L)
Add multiple labels to the report.
Sourcepub fn with_label(self, label: Label) -> Self
pub fn with_label(self, label: Label) -> Self
Add a label to the report.
Sourcepub fn with_labels<L: IntoIterator<Item = Label>>(self, labels: L) -> Self
pub fn with_labels<L: IntoIterator<Item = Label>>(self, labels: L) -> Self
Add multiple labels to the report.
Sourcepub fn with_config(self, config: Config) -> Self
pub fn with_config(self, config: Config) -> Self
Use the given Config
to determine diagnostic attributes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReportBuilder
impl !RefUnwindSafe for ReportBuilder
impl !Send for ReportBuilder
impl !Sync for ReportBuilder
impl Unpin for ReportBuilder
impl !UnwindSafe for ReportBuilder
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