Struct wiggle_generate::Names
source · pub struct Names { /* private fields */ }
Implementations§
source§impl Names
impl Names
pub fn new(runtime_mod: TokenStream) -> Names
pub fn runtime_mod(&self) -> TokenStream
pub fn type_(&self, id: &Id) -> TokenStream
pub fn builtin_type(&self, b: BuiltinType) -> TokenStream
pub fn wasm_type(&self, ty: WasmType) -> TokenStream
pub fn type_ref(&self, tref: &TypeRef, lifetime: TokenStream) -> TokenStream
sourcepub fn enum_variant(&self, id: &Id) -> Ident
pub fn enum_variant(&self, id: &Id) -> Ident
pub fn flag_member(&self, id: &Id) -> Ident
pub fn int_member(&self, id: &Id) -> Ident
sourcepub fn struct_member(&self, id: &Id) -> Ident
pub fn struct_member(&self, id: &Id) -> Ident
sourcepub fn trait_name(&self, id: &Id) -> Ident
pub fn trait_name(&self, id: &Id) -> Ident
sourcepub fn func_param(&self, id: &Id) -> Ident
pub fn func_param(&self, id: &Id) -> Ident
sourcepub fn func_ptr_binding(&self, id: &Id) -> Ident
pub fn func_ptr_binding(&self, id: &Id) -> Ident
For when you need a {name}_ptr binding for passing a value by reference:
sourcepub fn func_len_binding(&self, id: &Id) -> Ident
pub fn func_len_binding(&self, id: &Id) -> Ident
For when you need a {name}_len binding for passing an array: