pub struct ExactStringPrimitive {
pub allowed_strings: Vec<String>,
}Fields§
§allowed_strings: Vec<String>Implementations§
Source§impl ExactStringPrimitive
impl ExactStringPrimitive
pub fn add_strings_to_allowed<T: AsRef<str>>( &mut self, words: &[T], ) -> &mut Self
pub fn add_string_to_allowed<T: AsRef<str>>(&mut self, word: T) -> &mut Self
pub fn remove_string_from_allowed<T: AsRef<str>>( &mut self, word: T, ) -> &mut Self
Trait Implementations§
Source§impl Clone for ExactStringPrimitive
impl Clone for ExactStringPrimitive
Source§fn clone(&self) -> ExactStringPrimitive
fn clone(&self) -> ExactStringPrimitive
Returns a duplicate of the value. Read more
1.0.0 · 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 ExactStringPrimitive
impl Debug for ExactStringPrimitive
Source§impl Default for ExactStringPrimitive
impl Default for ExactStringPrimitive
Source§fn default() -> ExactStringPrimitive
fn default() -> ExactStringPrimitive
Returns the “default value” for a type. Read more
Source§impl PrimitiveTrait for ExactStringPrimitive
impl PrimitiveTrait for ExactStringPrimitive
type PrimitiveResult = String
fn clear_primitive(&mut self)
fn type_description(&self, result_can_be_none: bool) -> &str
fn solution_description(&self, result_can_be_none: bool) -> String
fn stop_word_result_is_none(&self, result_can_be_none: bool) -> Option<String>
fn grammar(&self) -> Grammar
fn parse_to_primitive(&self, content: &str) -> Result<Self::PrimitiveResult>
Source§impl ReasonTrait for ExactStringPrimitive
impl ReasonTrait for ExactStringPrimitive
fn primitive_to_result_index(&self, content: &str) -> u32
fn result_index_to_primitive( &self, result_index: Option<u32>, ) -> Result<Option<String>>
fn parse_reason_result( &self, reason_result: &ReasonResult, ) -> Result<Option<Self::PrimitiveResult>>
Auto Trait Implementations§
impl Freeze for ExactStringPrimitive
impl RefUnwindSafe for ExactStringPrimitive
impl Send for ExactStringPrimitive
impl Sync for ExactStringPrimitive
impl Unpin for ExactStringPrimitive
impl UnwindSafe for ExactStringPrimitive
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