pub trait PrimitiveTrait: Default {
type PrimitiveResult: Display;
// Required methods
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, Error>;
}Required Associated Types§
type PrimitiveResult: Display
Required Methods§
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, Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.