pub struct Annotation {
pub path: Vec<Seg>,
pub severity: Severity,
pub message: String,
}Expand description
One host finding, addressed at a node by the same path everything else here is addressed by.
The path need not name a row that exists. A finding about a key the document has since lost is simply never matched — dropping it would make the host responsible for pruning its own list against a tree it does not own.
Fields§
§path: Vec<Seg>The fig path of the node this is about. The empty path is the document.
severity: Severity§message: StringOne line, written for the person looking at the row. A renderer with a status bar shows it there; one with room shows it under the row.
Implementations§
Source§impl Annotation
impl Annotation
Sourcepub fn new(
path: Vec<Seg>,
severity: Severity,
message: impl Into<String>,
) -> Self
pub fn new( path: Vec<Seg>, severity: Severity, message: impl Into<String>, ) -> Self
A finding at path.
Sourcepub fn error(path: Vec<Seg>, message: impl Into<String>) -> Self
pub fn error(path: Vec<Seg>, message: impl Into<String>) -> Self
Shorthand for an Severity::Error at path.
Trait Implementations§
Source§impl Clone for Annotation
impl Clone for Annotation
Source§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Annotation
impl Debug for Annotation
impl Eq for Annotation
Source§impl PartialEq for Annotation
impl PartialEq for Annotation
impl StructuralPartialEq for Annotation
Auto Trait Implementations§
impl Freeze for Annotation
impl RefUnwindSafe for Annotation
impl Send for Annotation
impl Sync for Annotation
impl Unpin for Annotation
impl UnsafeUnpin for Annotation
impl UnwindSafe for Annotation
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