pub struct Builder { /* private fields */ }Expand description
Generate Rust code for the VPP handling of APIs of from a .api file
§Examples
Example of use from a build script:
use std::{env, path::PathBuf};
let output_dir = PathBuf::from(env::var("OUT_DIR").unwrap()).join("src");
vpp_plugin_api_gen::Builder::new("example.api", &output_dir.to_string_lossy())
.expect("unable to generate API binding")
.generate()
.expect("unable to generate API binding");This can then be include in the plugin as follows:
ⓘ
mod example_api {
include!(concat!(env!("OUT_DIR"), "/src/example_api.rs"));
}Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe for Builder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more