PrimitiveTrait

Trait PrimitiveTrait 

Source
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>;
}

Required Associated Types§

Required Methods§

Source

fn clear_primitive(&mut self)

Source

fn type_description(&self, result_can_be_none: bool) -> &str

Source

fn solution_description(&self, result_can_be_none: bool) -> String

Source

fn stop_word_result_is_none(&self, result_can_be_none: bool) -> Option<String>

Source

fn grammar(&self) -> Grammar

Source

fn parse_to_primitive(&self, content: &str) -> Result<Self::PrimitiveResult>

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.

Implementors§