pub struct RustWasm { /* private fields */ }
Implementations
Trait Implementations
sourceimpl 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,
generate_structs: bool
)
fn type_tuple(
&mut self,
iface: &Interface,
id: TypeId,
_name: &str,
tuple: &Tuple,
docs: &Docs,
generate_structs: bool
)
fn type_flags(
&mut self,
_iface: &Interface,
_id: TypeId,
name: &str,
flags: &Flags,
docs: &Docs,
generate_structs: bool
)
fn type_variant(
&mut self,
iface: &Interface,
id: TypeId,
_name: &str,
variant: &Variant,
docs: &Docs,
generate_structs: bool
)
fn type_union(
&mut self,
iface: &Interface,
id: TypeId,
_name: &str,
union: &Union,
docs: &Docs,
generate_structs: bool
)
fn type_option(
&mut self,
iface: &Interface,
id: TypeId,
_name: &str,
payload: &Type,
docs: &Docs,
generate_structs: bool
)
fn type_expected(
&mut self,
iface: &Interface,
id: TypeId,
_name: &str,
expected: &Expected,
docs: &Docs,
generate_structs: bool
)
fn type_enum(
&mut self,
_iface: &Interface,
id: TypeId,
name: &str,
enum_: &Enum,
docs: &Docs,
generate_structs: bool
)
fn type_resource(&mut self, iface: &Interface, ty: ResourceId)
fn type_alias(
&mut self,
iface: &Interface,
id: TypeId,
_name: &str,
ty: &Type,
docs: &Docs,
generate_structs: bool
)
fn type_list(
&mut self,
iface: &Interface,
id: TypeId,
_name: &str,
ty: &Type,
docs: &Docs,
generate_structs: bool
)
fn type_builtin(
&mut self,
iface: &Interface,
_id: TypeId,
name: &str,
ty: &Type,
docs: &Docs,
generate_structs: bool
)
fn preprocess_functions(&mut self, _iface: &Interface, dir: Direction)
fn import(&mut self, iface: &Interface, func: &Function, generate_structs: bool)
fn export(&mut self, iface: &Interface, func: &Function, generate_structs: bool)
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,
generate_structs: bool
)
fn generate_all(
&mut self,
imports: &[Interface],
exports: &[Interface],
files: &mut Files,
generate_structs: bool
)
sourceimpl RustGenerator for RustWasm
impl RustGenerator for RustWasm
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>,
generate_struct_always: bool
) -> Vec<(String, TypeMode), Global>
sourcefn 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.
sourcefn 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.
fn print_typedef_record(
&mut self,
iface: &Interface,
id: Id<TypeDef>,
record: &Record,
docs: &Docs,
generate_structs: bool
)
fn print_typedef_tuple(
&mut self,
iface: &Interface,
id: Id<TypeDef>,
tuple: &Tuple,
docs: &Docs,
generate_structs: bool
)
fn print_typedef_variant(
&mut self,
iface: &Interface,
id: Id<TypeDef>,
variant: &Variant,
docs: &Docs,
generate_structs: bool
)
fn print_typedef_union(
&mut self,
iface: &Interface,
id: Id<TypeDef>,
union: &Union,
docs: &Docs,
generate_structs: bool
)
fn print_rust_enum<'a>(
&mut self,
iface: &Interface,
id: Id<TypeDef>,
cases: impl IntoIterator<Item = (String, &'a Docs, &'a Type)> + Clone,
docs: &Docs,
generate_structs: bool
)
fn print_rust_enum_debug<'a>(
&mut self,
id: Id<TypeDef>,
mode: TypeMode,
name: &str,
cases: impl IntoIterator<Item = (String, &'a Type)>
)
fn print_typedef_option(
&mut self,
iface: &Interface,
id: Id<TypeDef>,
payload: &Type,
docs: &Docs,
generate_structs: bool
)
fn print_typedef_expected(
&mut self,
iface: &Interface,
id: Id<TypeDef>,
expected: &Expected,
docs: &Docs,
generate_structs: bool
)
fn print_typedef_enum(
&mut self,
id: Id<TypeDef>,
name: &str,
enum_: &Enum,
docs: &Docs,
generate_structs: bool
)
fn print_typedef_alias(
&mut self,
iface: &Interface,
id: Id<TypeDef>,
ty: &Type,
docs: &Docs,
generate_structs: bool
)
fn print_type_list(
&mut self,
iface: &Interface,
id: Id<TypeDef>,
ty: &Type,
docs: &Docs,
generate_structs: bool
)
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 RefUnwindSafe for RustWasm
impl Send for RustWasm
impl Sync for RustWasm
impl Unpin for RustWasm
impl UnwindSafe for RustWasm
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more