pub trait GenerateSignature: Debug + Clone {
// Required method
fn generate_signature_with_opts(&self, opts: &SignatureOptions) -> String;
// Provided method
fn generate_signature(&self) -> String { ... }
}Expand description
A trait to generate a textual “signature” (or declaration line(s)) for different AST nodes (Fn, Struct, Enum, etc.), possibly with doc lines, etc.
Required Methods§
Sourcefn generate_signature_with_opts(&self, opts: &SignatureOptions) -> String
fn generate_signature_with_opts(&self, opts: &SignatureOptions) -> String
Flexible entry point: generate signature with the given options.
Provided Methods§
Sourcefn generate_signature(&self) -> String
fn generate_signature(&self) -> String
Default convenience wrapper: generate signature with fully expanded detail & doc lines.
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.