pub enum Grammar {
Boolean(BooleanGrammar),
Integer(IntegerGrammar),
Text(TextGrammar),
Sentences(SentencesGrammar),
Words(WordsGrammar),
TextList(TextListGrammar),
BasicUrl(BasicUrlGrammar),
ExactString(ExactStringGrammar),
FauxUrl(FauxUrlGrammar),
NoneGrammar(NoneGrammar),
Custom(CustomGrammar),
}Variants§
Boolean(BooleanGrammar)
Integer(IntegerGrammar)
Text(TextGrammar)
Sentences(SentencesGrammar)
Words(WordsGrammar)
TextList(TextListGrammar)
BasicUrl(BasicUrlGrammar)
ExactString(ExactStringGrammar)
FauxUrl(FauxUrlGrammar)
NoneGrammar(NoneGrammar)
Custom(CustomGrammar)
Implementations§
Source§impl Grammar
impl Grammar
pub fn boolean() -> BooleanGrammar
pub fn integer() -> IntegerGrammar
pub fn text() -> TextGrammar
pub fn sentences() -> SentencesGrammar
pub fn words() -> WordsGrammar
pub fn text_list() -> TextListGrammar
pub fn basic_url() -> BasicUrlGrammar
pub fn exact_string() -> ExactStringGrammar
pub fn faux_url() -> FauxUrlGrammar
pub fn none() -> NoneGrammar
pub fn custom() -> CustomGrammar
pub fn grammar_string(&self) -> String
pub fn validate_clean(&self, content: &str) -> Result<String, GrammarError>
pub fn set_stop_word_done<T: AsRef<str>>(&mut self, stop_word: T) -> &mut Self
pub fn set_stop_word_no_result<T: AsRef<str>>( &mut self, stop_word: T, ) -> &mut Self
Trait Implementations§
impl StructuralPartialEq for Grammar
Auto Trait Implementations§
impl !Freeze for Grammar
impl !RefUnwindSafe for Grammar
impl Send for Grammar
impl !Sync for Grammar
impl Unpin for Grammar
impl UnwindSafe for Grammar
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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