pub struct WeirLinter { /* private fields */ }Implementations§
Source§impl WeirLinter
impl WeirLinter
pub fn new(weir_code: &str) -> Result<WeirLinter, Error>
pub fn into_chunk_linter(self) -> Result<impl ExprLinter<Unit = Chunk>, Self>
pub fn into_sentence_linter( self, ) -> Result<impl ExprLinter<Unit = Sentence>, Self>
Sourcepub fn count_tests(&self) -> usize
pub fn count_tests(&self) -> usize
Counts the total number of tests defined.
Sourcepub fn run_tests(&mut self) -> Vec<TestResult>
pub fn run_tests(&mut self) -> Vec<TestResult>
Runs the tests defined in the source code, returning any failing results.
Trait Implementations§
Source§impl Linter for WeirLinter
impl Linter for WeirLinter
Source§fn lint(&mut self, document: &Document) -> Vec<Lint>
fn lint(&mut self, document: &Document) -> Vec<Lint>
Analyzes a document and produces zero or more
Lints.
We pass self mutably for caching purposes.Source§fn description(&self) -> &str
fn description(&self) -> &str
A user-facing description of what kinds of grammatical errors this rule looks for.
It is usually shown in settings menus.
Auto Trait Implementations§
impl !RefUnwindSafe for WeirLinter
impl !UnwindSafe for WeirLinter
impl Freeze for WeirLinter
impl Send for WeirLinter
impl Sync for WeirLinter
impl Unpin for WeirLinter
impl UnsafeUnpin for WeirLinter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<L> HtmlDescriptionLinter for L
impl<L> HtmlDescriptionLinter for L
fn description_html(&self) -> String
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more