Skip to main content

Engine

Struct Engine 

Source
pub struct Engine {
    pub tier1_keys: Vec<String>,
    pub tier2_keys: Vec<String>,
    pub tier3_keys: Vec<String>,
    pub keep_tier2_entries: bool,
    pub keep_tier3_entries: bool,
    pub fail_on_tier2: bool,
    pub fail_on_tier3: bool,
    pub fail_on_tier1_and_2: bool,
    pub normalize_unicode: bool,
    pub reset_string_on_fail: bool,
    /* private fields */
}

Fields§

§tier1_keys: Vec<String>§tier2_keys: Vec<String>§tier3_keys: Vec<String>§keep_tier2_entries: bool§keep_tier3_entries: bool§fail_on_tier2: bool§fail_on_tier3: bool§fail_on_tier1_and_2: bool§normalize_unicode: bool§reset_string_on_fail: bool

Implementations§

Source§

impl Engine

Source

pub fn new() -> Engine

Source

pub fn rebuild(&mut self)

Rebuild Engine, used when updating Normally it is done by the Engine::load function

Source

pub fn load( &mut self, tier1_keys: Vec<String>, tier2_keys: Vec<String>, tier3_keys: Vec<String>, concat: bool, rebuild: bool, )

Load key datasets inside of the Engine

Source

pub fn process(&self, input: String) -> DtxtOutput

Process a String using the Engine

Trait Implementations§

Source§

impl Default for Engine

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.