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§
Sourcefn add_function<F>(&mut self, function: F)
fn add_function<F>(&mut self, function: F)
Adds the function.
Provided Methods§
Sourcefn with_function<F>(self, function: F) -> Self
fn with_function<F>(self, function: F) -> Self
Adds the function.
Sourcefn write_functions(&self, b: &mut CodeBuffer, level: usize)
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.