Struct ariadne::ReportBuilder
source · pub struct ReportBuilder<'a, S: Span> { /* private fields */ }
Expand description
A type used to build a Report
.
Implementations§
source§impl<'a, S: Span> ReportBuilder<'a, S>
impl<'a, S: Span> ReportBuilder<'a, S>
sourcepub fn with_code<C: Display>(self, code: C) -> Self
pub fn with_code<C: Display>(self, code: C) -> 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, msg: M)
pub fn set_message<M: ToString>(&mut self, msg: M)
Set the message of this report.
sourcepub fn with_message<M: ToString>(self, msg: M) -> Self
pub fn with_message<M: ToString>(self, msg: M) -> Self
Add a message to this report.
sourcepub fn add_labels<L: IntoIterator<Item = Label<S>>>(&mut self, labels: L)
pub fn add_labels<L: IntoIterator<Item = Label<S>>>(&mut self, labels: L)
Add multiple labels to the report.
sourcepub fn with_label(self, label: Label<S>) -> Self
pub fn with_label(self, label: Label<S>) -> Self
Add a label to the report.
sourcepub fn with_labels<L: IntoIterator<Item = Label<S>>>(self, labels: L) -> Self
pub fn with_labels<L: IntoIterator<Item = Label<S>>>(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<'a, S> RefUnwindSafe for ReportBuilder<'a, S>
impl<'a, S> Send for ReportBuilder<'a, S>
impl<'a, S> Sync for ReportBuilder<'a, S>
impl<'a, S> Unpin for ReportBuilder<'a, S>
impl<'a, S> UnwindSafe for ReportBuilder<'a, S>
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