pub struct Wasmer { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl Generator for Wasmer
impl Generator for Wasmer
fn preprocess_one(&mut self, iface: &Interface, dir: Direction)
fn type_record( &mut self, iface: &Interface, id: TypeId, name: &str, record: &Record, docs: &Docs, )
fn type_tuple( &mut self, iface: &Interface, id: TypeId, _name: &str, tuple: &Tuple, docs: &Docs, )
fn type_flags( &mut self, _iface: &Interface, _id: TypeId, name: &str, flags: &Flags, docs: &Docs, )
fn type_variant( &mut self, iface: &Interface, id: TypeId, _name: &str, variant: &Variant, docs: &Docs, )
fn type_enum( &mut self, _iface: &Interface, id: TypeId, name: &str, enum_: &Enum, docs: &Docs, )
fn type_union( &mut self, iface: &Interface, id: TypeId, _name: &str, union: &Union, docs: &Docs, )
fn type_option( &mut self, iface: &Interface, id: TypeId, _name: &str, payload: &Type, docs: &Docs, )
fn type_expected( &mut self, iface: &Interface, id: TypeId, _name: &str, expected: &Expected, docs: &Docs, )
fn type_resource(&mut self, iface: &Interface, ty: ResourceId)
fn type_alias( &mut self, iface: &Interface, id: TypeId, _name: &str, ty: &Type, docs: &Docs, )
fn type_list( &mut self, iface: &Interface, id: TypeId, _name: &str, ty: &Type, docs: &Docs, )
fn type_builtin( &mut self, iface: &Interface, _id: TypeId, name: &str, ty: &Type, docs: &Docs, )
fn export(&mut self, iface: &Interface, func: &Function)
fn import(&mut self, iface: &Interface, func: &Function)
fn finish_one(&mut self, iface: &Interface, files: &mut Files)
fn preprocess_all(&mut self, imports: &[Interface], exports: &[Interface])
fn preprocess_functions(&mut self, iface: &Interface, dir: Direction)
fn finish_functions(&mut self, iface: &Interface, dir: Direction)
fn finish_all(&mut self, files: &mut Files)
fn generate_one(&mut self, iface: &Interface, dir: Direction, files: &mut Files)
fn generate_all( &mut self, imports: &[Interface], exports: &[Interface], files: &mut Files, )
Source§impl RustGenerator for Wasmer
impl RustGenerator for Wasmer
fn default_param_mode(&self) -> TypeMode
fn handle_projection(&self) -> Option<(&'static str, String)>
fn handle_wrapper(&self) -> Option<&'static str>
fn push_str(&mut self, s: &str)
fn info(&self, ty: TypeId) -> TypeInfo
fn types_mut(&mut self) -> &mut Types
fn print_borrowed_slice( &mut self, iface: &Interface, mutbl: bool, ty: &Type, lifetime: &'static str, )
fn print_borrowed_str(&mut self, lifetime: &'static str)
fn handle_in_super(&self) -> bool
Source§fn always_generate_structs(&self) -> bool
fn always_generate_structs(&self) -> bool
Make the code generator always generate types, even if they are never
used.
fn rustdoc(&mut self, docs: &Docs)
fn rustdoc_params(&mut self, docs: &[(String, Type)], header: &str)
fn print_signature( &mut self, iface: &Interface, func: &Function, param_mode: TypeMode, sig: &FnSig, ) -> Vec<String>
fn print_docs_and_params( &mut self, iface: &Interface, func: &Function, param_mode: TypeMode, sig: &FnSig, ) -> Vec<String>
fn print_ty(&mut self, iface: &Interface, ty: &Type, mode: TypeMode)
fn print_tyid(&mut self, iface: &Interface, id: Id<TypeDef>, mode: TypeMode)
fn print_list(&mut self, iface: &Interface, ty: &Type, mode: TypeMode)
fn print_rust_slice( &mut self, iface: &Interface, mutbl: bool, ty: &Type, lifetime: &'static str, )
fn print_generics( &mut self, info: &TypeInfo, lifetime: Option<&str>, bound: bool, )
fn int_repr(&mut self, repr: Int)
fn wasm_type(&mut self, ty: WasmType)
fn modes_of( &self, iface: &Interface, ty: Id<TypeDef>, ) -> Vec<(String, TypeMode)>
Source§fn write_name(&self, iface: &Interface, ty: &Type, out: &mut String)
fn write_name(&self, iface: &Interface, ty: &Type, out: &mut String)
Writes the camel-cased ‘name’ of the passed type to
out
, as used to name union variants.Source§fn union_case_names(&self, iface: &Interface, union: &Union) -> Vec<String>
fn union_case_names(&self, iface: &Interface, union: &Union) -> Vec<String>
Returns the names for the cases of the passed union.
fn print_typedef_record( &mut self, iface: &Interface, id: Id<TypeDef>, record: &Record, docs: &Docs, )
fn print_typedef_tuple( &mut self, iface: &Interface, id: Id<TypeDef>, tuple: &Tuple, docs: &Docs, )
fn print_typedef_variant(
&mut self,
iface: &Interface,
id: Id<TypeDef>,
variant: &Variant,
docs: &Docs,
)where
Self: Sized,
fn print_typedef_union(
&mut self,
iface: &Interface,
id: Id<TypeDef>,
union: &Union,
docs: &Docs,
)where
Self: Sized,
fn print_rust_enum<'a>(
&mut self,
iface: &Interface,
id: Id<TypeDef>,
cases: impl IntoIterator<Item = (String, &'a Docs, &'a Type)> + Clone,
docs: &Docs,
)where
Self: Sized,
fn print_rust_enum_debug<'a>(
&mut self,
id: Id<TypeDef>,
mode: TypeMode,
name: &str,
cases: impl IntoIterator<Item = (String, &'a Type)>,
)where
Self: Sized,
fn print_typedef_option( &mut self, iface: &Interface, id: Id<TypeDef>, payload: &Type, docs: &Docs, )
fn print_typedef_expected( &mut self, iface: &Interface, id: Id<TypeDef>, expected: &Expected, docs: &Docs, )
fn print_typedef_enum(
&mut self,
id: Id<TypeDef>,
name: &str,
enum_: &Enum,
docs: &Docs,
)where
Self: Sized,
fn print_typedef_alias( &mut self, iface: &Interface, id: Id<TypeDef>, ty: &Type, docs: &Docs, )
fn print_type_list( &mut self, iface: &Interface, id: Id<TypeDef>, ty: &Type, docs: &Docs, )
fn param_name(&self, iface: &Interface, ty: Id<TypeDef>) -> String
fn result_name(&self, iface: &Interface, ty: Id<TypeDef>) -> String
fn uses_two_names(&self, info: &TypeInfo) -> bool
fn lifetime_for(&self, info: &TypeInfo, mode: TypeMode) -> Option<&'static str>
Auto Trait Implementations§
impl Freeze for Wasmer
impl RefUnwindSafe for Wasmer
impl Send for Wasmer
impl Sync for Wasmer
impl Unpin for Wasmer
impl UnwindSafe for Wasmer
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