Struct cbindgen::Config
[−]
[src]
pub struct Config { pub header: Option<String>, pub trailer: Option<String>, pub include_guard: Option<String>, pub autogen_warning: Option<String>, pub include_version: bool, pub namespace: Option<String>, pub namespaces: Option<Vec<String>>, pub braces: Braces, pub line_length: usize, pub tab_width: usize, pub language: Language, pub parse: ParseConfig, pub function: FunctionConfig, pub structure: StructConfig, pub enumeration: EnumConfig, pub constant: ConstantConfig, pub defines: HashMap<String, String>, pub documentation: bool, }
A collection of settings to customize the generated bindings.
Fields
header: Option<String>
Optional text to output at the beginning of the file
trailer: Option<String>
Optional text to output at the end of the file
include_guard: Option<String>
Optional name to use for an include guard
autogen_warning: Option<String>
Optional text to output at major sections to deter manual editing
include_version: bool
Include a comment with the version of cbindgen used to generate the file
namespace: Option<String>
An optional name for the root namespace. Only applicable when language="C++"
namespaces: Option<Vec<String>>
An optional list of namespaces. Only applicable when language="C++"
braces: Braces
The style to use for braces
line_length: usize
The preferred length of a line, used for auto breaking function arguments
tab_width: usize
The amount of spaces in a tab
language: Language
The language to output bindings for
parse: ParseConfig
The configuration options for parsing
function: FunctionConfig
The configuration options for functions
structure: StructConfig
The configuration options for structs
enumeration: EnumConfig
The configuration options for enums
constant: ConstantConfig
defines: HashMap<String, String>
documentation: bool
Include doc comments from rust as documentation
Methods
impl Config
[src]
fn from_file(file_name: &str) -> Result<Config, String>
[src]
fn from_root_or_default(root: &Path) -> Config
[src]
Trait Implementations
impl Debug for Config
[src]
impl Clone for Config
[src]
fn clone(&self) -> Config
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more