[][src]Trait safer_ffi::headers::Definer

pub trait Definer: __ {
    fn insert(&mut self, name: &str) -> bool;
fn out(&mut self) -> &mut dyn Write; }
This is supported on feature="headers" only.

Helper for the generation of C headers.

Defining C headers requires two abstractions:

  • set-like lookup by name, to ensure each type is defined at most once;

  • a Writeable "out stream", where the headers should be written to.

This trait minimally combines both abstractions, and in exchange offers an auto-implemented non-overridable [Definer::define_once]().

Required methods

fn insert(&mut self, name: &str) -> bool

This is supported on feature="headers" only.

Must return true iff an actual insert happened.

fn out(&mut self) -> &mut dyn Write

This is supported on feature="headers" only.

Yields a handle to the underlying Writer

Loading content...

Implementors

impl<'_> Definer for HashSetDefiner<'_>[src]

Loading content...