[−][src]Struct cbindgen::Config
A collection of settings to customize the generated bindings.
Fields
header: Option<String>
Optional text to output at the beginning of the file
includes: Vec<String>
A list of additional includes to put at the beginning of the generated header
sys_includes: Vec<String>
A list of additional system includes to put at the beginning of the generated header
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
no_includes: bool
Generates no includes at all. Overrides all other include options
This option is useful when using cbindgen with tools such as python's cffi which doesn't understand include directives
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
style: Style
The style to declare structs, enums and unions in for C
parse: ParseConfig
The configuration options for parsing
export: ExportConfig
The configuration options for exporting
function: FunctionConfig
The configuration options for functions
structure: StructConfig
The configuration options for structs
enumeration: EnumConfig
The configuration options for enums
constant: ConstantConfig
The configuration options for constants
defines: HashMap<String, String>
Preprocessor defines to use when generating #ifdef's for #[cfg]
documentation: bool
Include doc comments from rust as documentation
Methods
impl Config
[src]
impl Config
pub fn from_file<P: AsRef<StdPath>>(file_name: P) -> Result<Config, String> | [src] |
pub fn from_root_or_default<P: AsRef<StdPath>>(root: P) -> Config | [src] |
Trait Implementations
impl Clone for Config
[src]
impl Clone for Config
fn clone(&self) -> Config | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl Default for Config
[src]
impl Default for Config
impl Debug for Config
[src]
impl Debug for Config
impl<'de> Deserialize<'de> for Config where
Config: Default,
[src]
impl<'de> Deserialize<'de> for Config where
Config: Default,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where | [src] |
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,