Generator

Trait Generator 

Source
pub trait Generator {
    type Err: Into<Error>;

    // Required methods
    fn is_avail(&self, name: &str) -> bool;
    fn generate(&self, name: &str, bin: &str) -> Result<String, Self::Err>;
}

Required Associated Types§

Required Methods§

Source

fn is_avail(&self, name: &str) -> bool

Source

fn generate(&self, name: &str, bin: &str) -> Result<String, Self::Err>

Trait Implementations§

Source§

impl<E: Into<Error>> Generator for Box<dyn Generator<Err = E>>

Source§

type Err = E

Source§

fn is_avail(&self, name: &str) -> bool

Source§

fn generate(&self, name: &str, bin: &str) -> Result<String, Self::Err>

Implementations on Foreign Types§

Source§

impl<E: Into<Error>> Generator for Box<dyn Generator<Err = E>>

Source§

type Err = E

Source§

fn is_avail(&self, name: &str) -> bool

Source§

fn generate(&self, name: &str, bin: &str) -> Result<String, Self::Err>

Implementors§