Struct dlwrap::Builder

source ·
pub struct Builder { /* private fields */ }
Expand description

A builder for generating a bindings header

Implementations§

source§

impl Builder

source

pub fn new(input: impl AsRef<Path>) -> Self

Create a new builder

source

pub fn output_dir(&mut self, output_dir: impl AsRef<Path>) -> &mut Self

Set path to output directory

source

pub fn clang_resource_dir( &mut self, clang_resource_dir: impl AsRef<Path>, ) -> &mut Self

Set resource directory to clang

source

pub fn symbol(&mut self, symbol: &str) -> &mut Self

Set symbol to match

source

pub fn symbol_regex(&mut self, symbol_regex: &Regex) -> &mut Self

Set pattern to match symbol

source

pub fn loader_basename(&mut self, loader_basename: &str) -> &mut Self

Set basename of the loader module

source

pub fn prefix(&mut self, prefix: &str) -> &mut Self

Set library prefix

source

pub fn symbol_prefix(&mut self, symbol_prefix: &str) -> &mut Self

Set symbol prefix

source

pub fn function_prefix(&mut self, function_prefix: &str) -> &mut Self

Set function prefix

source

pub fn soname(&mut self, soname: &str) -> &mut Self

Set name of the library soname macro

source

pub fn function_wrapper(&mut self, function_wrapper: &str) -> &mut Self

Set name of the function wrapper macro

source

pub fn include(&mut self, include: &str) -> &mut Self

Set additional header file to include

source

pub fn license(&mut self, license: &str) -> &mut Self

Set license of the input file

source

pub fn header_guard(&mut self, header_guard: &str) -> &mut Self

Set name of the header guard macro

source

pub fn generate(&mut self) -> Result<(), Box<dyn Error>>

Generate code

Trait Implementations§

source§

impl Default for Builder

source§

fn default() -> Builder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.