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 trappable_imports: TrappableImports,
pub with: HashMap<String, String>,
pub additional_derive_attributes: Vec<String>,
pub skip_mut_forwarding_impls: bool,
}
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.
trappable_imports: TrappableImports
Configuration of which imports are allowed to generate a trap.
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?
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
skip_mut_forwarding_impls: bool
Temporary option to skip impl<T: Trait> Trait for &mut T
for the
wasmtime-wasi
crate while that’s given a chance to update its b
indings.
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)