WithFunctions

Trait WithFunctions 

Source
pub trait WithFunctions: Sized {
    // Required methods
    fn functions(&self) -> &[Function];
    fn add_function<F>(&mut self, function: F)
       where F: Into<Function>;

    // Provided methods
    fn with_function<F>(self, function: F) -> Self
       where F: Into<Function> { ... }
    fn write_functions(&self, b: &mut CodeBuffer, level: usize) { ... }
}
Expand description

An element with functions.

Required Methods§

Source

fn functions(&self) -> &[Function]

Gets the functions.

Source

fn add_function<F>(&mut self, function: F)
where F: Into<Function>,

Adds the function.

Provided Methods§

Source

fn with_function<F>(self, function: F) -> Self
where F: Into<Function>,

Adds the function.

Source

fn write_functions(&self, b: &mut CodeBuffer, level: usize)

Writes the functions.

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§