pub struct Ctx<'a> {
pub path: &'a str,
/* private fields */
}Expand description
The rule author’s finding factory — the engine fills path and the id’s default level.
Fields§
§path: &'a strthe document path stamped on every finding
Implementations§
Source§impl<'a> Ctx<'a>
impl<'a> Ctx<'a>
Sourcepub fn new(path: &'a str, registry: &'a Registry) -> Self
pub fn new(path: &'a str, registry: &'a Registry) -> Self
A factory for findings of the document at path, with levels from registry.
Sourcepub fn finding(&self, spec: FindingSpec) -> Finding
pub fn finding(&self, spec: FindingSpec) -> Finding
Build a Finding: stamps path, fills level from the registry (defaulting to
"error" for an unregistered id), carries pos only when supplied.
Auto Trait Implementations§
impl<'a> Freeze for Ctx<'a>
impl<'a> RefUnwindSafe for Ctx<'a>
impl<'a> Send for Ctx<'a>
impl<'a> Sync for Ctx<'a>
impl<'a> Unpin for Ctx<'a>
impl<'a> UnsafeUnpin for Ctx<'a>
impl<'a> UnwindSafe for Ctx<'a>
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