pub struct Label {
    pub style: LabelStyle,
    pub span: Span,
    pub message: String,
}Fields§
§style: LabelStyle§span: Span§message: StringImplementations§
Source§impl Label
 
impl Label
Sourcepub fn primary<S>(span: Span, message: S) -> Label
 
pub fn primary<S>(span: Span, message: S) -> Label
Create a primary label with the given message. This will underline the
given span with carets (^^^^).
Sourcepub fn secondary<S>(span: Span, message: S) -> Label
 
pub fn secondary<S>(span: Span, message: S) -> Label
Create a secondary label with the given message. This will underline the
given span with hyphens (----).
Sourcepub fn into_cs_label(self) -> Label<SourceFileId>
 
pub fn into_cs_label(self) -> Label<SourceFileId>
Convert into a [codespan_reporting::Diagnostic::Label]
Trait Implementations§
impl Eq for Label
impl StructuralPartialEq for Label
Auto Trait Implementations§
impl Freeze for Label
impl RefUnwindSafe for Label
impl Send for Label
impl Sync for Label
impl Unpin for Label
impl UnwindSafe for Label
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,
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.§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
Checks if this value is equivalent to the given key. Read more
§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.