wit_bindgen_wrpc_rust

Struct Opts

source
pub struct Opts {
Show 15 fields pub format: bool, pub skip: Vec<String>, pub bitflags_path: Option<String>, pub additional_derive_attributes: Vec<String>, pub with: Vec<(String, WithOption)>, pub generate_all: bool, pub generate_unused_types: bool, pub anyhow_path: Option<String>, pub bytes_path: Option<String>, pub futures_path: Option<String>, pub tokio_path: Option<String>, pub tokio_util_path: Option<String>, pub tracing_path: Option<String>, pub wasm_tokio_path: Option<String>, pub wrpc_transport_path: Option<String>,
}

Fields§

§format: bool

Whether or not a formatter is executed to format generated code.

§skip: Vec<String>

Names of functions to skip generating bindings for.

§bitflags_path: Option<String>

The optional path to the bitflags crate to use.

This defaults to wit_bindgen_wrpc::bitflags.

§additional_derive_attributes: Vec<String>

Additional derive attributes to add to generated types. If using in a CLI, this flag can be specified multiple times to add multiple attributes.

These derive attributes will be added to any generated structs or enums

§with: Vec<(String, WithOption)>

Remapping of interface names to rust module names.

Argument must be of the form k=v and this option can be passed multiple times or one option can be comma separated, for example k1=v1,k2=v2.

§generate_all: bool

Indicates that all interfaces not specified in with should be generated.

§generate_unused_types: bool

Whether to generate unused structures, not generated by default (false)

§anyhow_path: Option<String>

The optional path to the anyhow crate to use.

This defaults to wit_bindgen_wrpc::anyhow.

§bytes_path: Option<String>

The optional path to the bytes crate to use.

This defaults to wit_bindgen_wrpc::bytes.

§futures_path: Option<String>

The optional path to the futures crate to use.

This defaults to wit_bindgen_wrpc::futures.

§tokio_path: Option<String>

The optional path to the tokio crate to use.

This defaults to wit_bindgen_wrpc::tokio.

§tokio_util_path: Option<String>

The optional path to the tokio-util crate to use.

This defaults to wit_bindgen_wrpc::tokio_util.

§tracing_path: Option<String>

The optional path to the tracing crate to use.

This defaults to wit_bindgen_wrpc::tracing.

§wasm_tokio_path: Option<String>

The optional path to the wasm-tokio crate to use.

This defaults to wit_bindgen_wrpc::wasm_tokio.

§wrpc_transport_path: Option<String>

The optional path to the wrpc-transport crate to use.

This defaults to wit_bindgen_wrpc::wrpc_transport.

Implementations§

source§

impl Opts

source

pub fn build(self) -> Box<dyn WorldGenerator>

Trait Implementations§

source§

impl Clone for Opts

source§

fn clone(&self) -> Opts

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Opts

source§

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

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

impl Default for Opts

source§

fn default() -> Opts

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

Auto Trait Implementations§

§

impl Freeze for Opts

§

impl RefUnwindSafe for Opts

§

impl Send for Opts

§

impl Sync for Opts

§

impl Unpin for Opts

§

impl UnwindSafe for Opts

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.