pub struct TextPrimitive {
pub text_token_length: u32,
pub disallowed_chars: Vec<char>,
pub allow_newline: bool,
}Fields§
§text_token_length: u32§disallowed_chars: Vec<char>§allow_newline: boolImplementations§
Source§impl TextPrimitive
impl TextPrimitive
pub fn text_token_length(&mut self, text_token_length: u32) -> &mut Self
pub fn disallowed_char(&mut self, disallowed_char: char) -> &mut Self
pub fn disallowed_chars(&mut self, disallowed_chars: Vec<char>) -> &mut Self
pub fn allow_newline(&mut self, allow_newline: bool) -> &mut Self
Trait Implementations§
Source§impl Default for TextPrimitive
impl Default for TextPrimitive
Source§impl PrimitiveTrait for TextPrimitive
impl PrimitiveTrait for TextPrimitive
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>
Auto Trait Implementations§
impl Freeze for TextPrimitive
impl RefUnwindSafe for TextPrimitive
impl Send for TextPrimitive
impl Sync for TextPrimitive
impl Unpin for TextPrimitive
impl UnwindSafe for TextPrimitive
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> 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