Struct Config

Source
pub struct Config {
    pub namespace: String,
    pub api_lib_name: String,
    pub parent_crate: String,
    pub rustdoc_crates: Vec<String>,
    pub file_prefix: Option<String>,
    pub copyright_header: Option<String>,
    pub generated_by_header: Option<String>,
    pub crate_feature_flags: Option<Vec<String>>,
    pub rustdoc_flags: Option<Vec<String>>,
}
Expand description

A Config object that provides information for the generation of C/C++ code

Fields§

§namespace: String

The namespace that should be used in the C++ code (required)

§api_lib_name: String

The name of the API library that is built (important for Rustdoc, required)

§parent_crate: String

The name of your API crate (important for Rustdoc, required)

§rustdoc_crates: Vec<String>

All crates that include the types you use in your API, needs to at least include your API crate (required)

§file_prefix: Option<String>

In case the file names of the generated C/C++ should have a prefix, put this here

§copyright_header: Option<String>

Copyright header to be included in every C/C++ file

§generated_by_header: Option<String>

Generated-by header to be included in every C/C++ file

§crate_feature_flags: Option<Vec<String>>

In case you need to set any feature flags for build process of Rustdoc, add them here

§rustdoc_flags: Option<Vec<String>>

Add some additional rustdoc flags here, can be useful for debugging

Implementations§

Source§

impl Config

Source

pub fn new( namespace: String, api_lib_name: String, parent_crate: String, rustdoc_crates: Vec<String>, ) -> Self

Create a new config object by only setting required fields

Source

pub fn extend_rustdoc_flags(&mut self, flags: Vec<String>)

Add some additional flags that should be passed when creating the rustdocs

Trait Implementations§

Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Config

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Config

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

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>,

Source§

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>,

Source§

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,