Struct wai_bindgen_gen_rust_wasm::RustWasm
source · pub struct RustWasm { /* private fields */ }
Implementations§
Trait Implementations§
source§impl Generator for RustWasm
impl Generator for RustWasm
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_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_enum( &mut self, _iface: &Interface, id: TypeId, name: &str, enum_: &Enum, 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 preprocess_functions(&mut self, _iface: &Interface, dir: Direction)
fn import(&mut self, iface: &Interface, func: &Function)
fn export(&mut self, iface: &Interface, func: &Function)
fn finish_functions(&mut self, iface: &Interface, dir: Direction)
fn finish_one(&mut self, iface: &Interface, files: &mut Files)
fn preprocess_all(&mut self, imports: &[Interface], exports: &[Interface])
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 RustWasm
impl RustGenerator for RustWasm
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 default_param_mode(&self) -> TypeMode
fn handle_projection(&self) -> Option<(&'static str, String)>
fn handle_in_super(&self) -> bool
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 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, Global>
fn print_docs_and_params( &mut self, iface: &Interface, func: &Function, param_mode: TypeMode, sig: &FnSig ) -> Vec<String, Global>
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), Global>
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, Global>
fn union_case_names( &self, iface: &Interface, union: &Union ) -> Vec<String, Global>
Returns the names for the cases of the passed union.