Struct wasmtime_wit_bindgen::Opts
source · pub struct Opts {
pub rustfmt: bool,
pub tracing: bool,
pub async_: AsyncConfig,
pub trappable_error_type: Vec<TrappableError>,
pub ownership: Ownership,
pub only_interfaces: bool,
pub with: HashMap<String, String>,
}
Fields§
§rustfmt: bool
Whether or not rustfmt
is executed to format generated code.
tracing: bool
Whether or not to emit tracing
macro calls on function entry/exit.
async_: AsyncConfig
Whether 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.
ownership: Ownership
Whether to generate owning or borrowing type definitions.
only_interfaces: bool
Whether 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 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> 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