Skip to main content

DocumentTarget

Trait DocumentTarget 

Source
pub trait DocumentTarget {
    // Required methods
    fn locator(&self) -> String;
    fn source_text(&self) -> String;
    fn query(&self) -> DocumentQuery;
}
Expand description

Trait for findings that can identify their target within a source document.

Required Methods§

Source

fn locator(&self) -> String

Return a string indicating where the issue is located, for use in check titles, summaries, etc.

Source

fn source_text(&self) -> String

Return source text

Source

fn query(&self) -> DocumentQuery

Return format-neutral criteria for resolving the finding in its original document.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§