[−][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
after_includes: Option<String>
Optional verbatim code added after the include blocks
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
pragma_once: bool
Add a #pragma once
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++"
using_namespaces: Option<Vec<String>>
An optional list of namespaces to declare as using. 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
line_endings: LineEndingStyle
The type of line endings to generate
language: Language
The language to output bindings for
cpp_compat: bool
Include preprocessor defines in C bindings to ensure C++ compatibility
style: Style
The style to declare structs, enums and unions in for C
sort_by: SortKey
Default sort key for functions and constants.
parse: ParseConfig
The configuration options for parsing
export: ExportConfig
The configuration options for exporting
macro_expansion: MacroExpansionConfig
The configuration options for macros.
layout: LayoutConfig
The configuration options for type layouts.
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
documentation_style: DocumentationStyle
How documentation comments should be styled.
pointer: PtrConfig
Configuration options for pointers
Implementations
impl Config
[src]
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 Debug for Config
[src]
impl Default for Config
[src]
impl<'de> Deserialize<'de> for Config where
Config: Default,
[src]
Config: Default,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,