WithTraitFunctions

Trait WithTraitFunctions 

Source
pub trait WithTraitFunctions: Sized {
    // Required methods
    fn signature_decs(&self) -> &[SignatureDec];
    fn add_signature_dec<S>(&mut self, signature: S)
       where S: Into<SignatureDec>;

    // Provided methods
    fn with_signature_dec<S>(self, signature: S) -> Self
       where S: Into<SignatureDec> { ... }
    fn write_signature_decs(&self, b: &mut CodeBuffer, level: usize) { ... }
}
Expand description

An element with function signature declarations.

Required Methods§

Source

fn signature_decs(&self) -> &[SignatureDec]

Gets the function signature declarations.

Source

fn add_signature_dec<S>(&mut self, signature: S)
where S: Into<SignatureDec>,

Adds the function signature declaration.

Provided Methods§

Source

fn with_signature_dec<S>(self, signature: S) -> Self
where S: Into<SignatureDec>,

Adds the function signature declaration.

Source

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

Writes the function signature declarations.

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§