code-gen 0.10.0

This library aids in code generation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::rust::Signature;
use crate::{CodeBuffer, Expression};

/// An element with a function signature.
pub trait WithSignature {
    /// Gets the function signature.
    fn signature(&self) -> &Signature;

    /// Writes the function signature.
    fn write_signature(&self, b: &mut CodeBuffer) {
        self.signature().write(b);
    }
}