pub struct SourceAnnotation {
pub span: Span,
pub message: SharedString,
}Expand description
Message attached to one highlighted source span.
Fields§
§span: SpanByte span highlighted by this annotation.
message: SharedStringUser-facing annotation message.
Implementations§
Source§impl SourceAnnotation
impl SourceAnnotation
Sourcepub fn new(span: Span, message: impl Into<SharedString>) -> Self
pub fn new(span: Span, message: impl Into<SharedString>) -> Self
Creates a source annotation from its span and message.
Trait Implementations§
Source§impl Clone for SourceAnnotation
impl Clone for SourceAnnotation
Source§fn clone(&self) -> SourceAnnotation
fn clone(&self) -> SourceAnnotation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourceAnnotation
impl Debug for SourceAnnotation
Source§impl PartialEq for SourceAnnotation
impl PartialEq for SourceAnnotation
impl Eq for SourceAnnotation
impl StructuralPartialEq for SourceAnnotation
Auto Trait Implementations§
impl Freeze for SourceAnnotation
impl RefUnwindSafe for SourceAnnotation
impl Send for SourceAnnotation
impl Sync for SourceAnnotation
impl Unpin for SourceAnnotation
impl UnsafeUnpin for SourceAnnotation
impl UnwindSafe for SourceAnnotation
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