Trait Crack

Source
pub trait Crack {
    // Required methods
    fn new() -> Self
       where Self: Sized;
    fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult;
    fn get_tags(&self) -> &Vec<&str>;
    fn get_name(&self) -> &str;
}
Expand description

All decoders will share the same Crack trait Which let’s us put them into a vector and iterate over them, Running .crack() on each of them. Relevant docs: https://docs.rs/crack/0.3.0/crack/trait.Crack.html

Required Methods§

Source

fn new() -> Self
where Self: Sized,

This function generates a new crack trait

Source

fn crack(&self, text: &str, checker: &CheckerTypes) -> CrackResult

Crack is the function that actually does the decoding

Source

fn get_tags(&self) -> &Vec<&str>

Get all tags for the current decoder

Source

fn get_name(&self) -> &str

Get the nam of the current decoder

Implementors§