Struct moore_common::errors::DiagBuilder2
source · [−]pub struct DiagBuilder2 {
pub severity: Severity,
pub message: String,
pub segments: Vec<DiagSegment>,
}
Fields
severity: Severity
message: String
segments: Vec<DiagSegment>
Implementations
sourceimpl DiagBuilder2
impl DiagBuilder2
pub fn new<S: Into<String>>(severity: Severity, message: S) -> DiagBuilder2
pub fn bug<S: Into<String>>(message: S) -> DiagBuilder2
pub fn fatal<S: Into<String>>(message: S) -> DiagBuilder2
pub fn error<S: Into<String>>(message: S) -> DiagBuilder2
pub fn warning<S: Into<String>>(message: S) -> DiagBuilder2
pub fn note<S: Into<String>>(message: S) -> DiagBuilder2
pub fn segment(self, segment: DiagSegment) -> DiagBuilder2
pub fn span<S: Into<Span>>(self, span: S) -> DiagBuilder2
pub fn add_note<S: Into<String>>(self, message: S) -> DiagBuilder2
pub fn get_severity(&self) -> Severity
pub fn get_message(&self) -> &String
pub fn get_segments(&self) -> &[DiagSegment]
Trait Implementations
sourceimpl Clone for DiagBuilder2
impl Clone for DiagBuilder2
sourcefn clone(&self) -> DiagBuilder2
fn clone(&self) -> DiagBuilder2
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DiagBuilder2
impl Debug for DiagBuilder2
Auto Trait Implementations
impl RefUnwindSafe for DiagBuilder2
impl Send for DiagBuilder2
impl Sync for DiagBuilder2
impl Unpin for DiagBuilder2
impl UnwindSafe for DiagBuilder2
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more