pub trait Named {
// Required methods
fn name() -> &'static str;
fn description() -> &'static str;
// Provided method
fn opts() -> Vec<PassOpt> { ... }
}
Expand description
Trait that describes named things. Calling do_pass
and do_pass_default
.
require this to be implemented.
This has to be a separate trait from Visitor
because these methods don’t recieve self
which
means that it is impossible to create dynamic trait objects.
Required Methods§
Sourcefn description() -> &'static str
fn description() -> &'static str
A short description of the pass.
Provided Methods§
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.