Struct wasmtime_wit_bindgen::Opts
source · pub struct Opts {
pub rustfmt: bool,
pub tracing: bool,
pub async_: bool,
pub trappable_error_type: Vec<TrappableError>,
pub duplicate_if_necessary: bool,
pub only_interfaces: bool,
pub with: HashMap<String, String>,
}Fields§
§rustfmt: boolWhether or not rustfmt is executed to format generated code.
tracing: boolWhether or not to emit tracing macro calls on function entry/exit.
async_: boolWhether or not to use async rust functions and traits.
trappable_error_type: Vec<TrappableError>A list of “trappable errors” which are used to replace the E in
result<T, E> found in WIT.
duplicate_if_necessary: boolWhether or not to generate “duplicate” type definitions for a single WIT type if necessary, for example if it’s used as both an import and an export.
only_interfaces: boolWhether or not to generate code for only the interfaces of this wit file or not.
with: HashMap<String, String>Remapping of interface names to rust module names. TODO: is there a better type to use for the value of this map?
Implementations§
Trait Implementations§
Auto Trait Implementations§
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> 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