Struct wiggle_generate::Names[][src]

pub struct Names { /* fields omitted */ }

Implementations

impl Names[src]

pub fn new(runtime_mod: TokenStream) -> Names[src]

pub fn runtime_mod(&self) -> TokenStream[src]

pub fn type_(&self, id: &Id) -> TokenStream[src]

pub fn builtin_type(&self, b: BuiltinType) -> TokenStream[src]

pub fn wasm_type(&self, ty: WasmType) -> TokenStream[src]

pub fn type_ref(&self, tref: &TypeRef, lifetime: TokenStream) -> TokenStream[src]

pub fn enum_variant(&self, id: &Id) -> Ident[src]

Convert an enum variant from its Id name to its Rust Ident representation.

pub fn flag_member(&self, id: &Id) -> Ident[src]

pub fn int_member(&self, id: &Id) -> Ident[src]

pub fn struct_member(&self, id: &Id) -> Ident[src]

Convert a struct member from its Id name to its Rust Ident representation.

pub fn module(&self, id: &Id) -> Ident[src]

Convert a module name from its Id name to its Rust Ident representation.

pub fn trait_name(&self, id: &Id) -> Ident[src]

Convert a trait name from its Id name to its Rust Ident representation.

pub fn func(&self, id: &Id) -> Ident[src]

Convert a function name from its Id name to its Rust Ident representation.

pub fn func_param(&self, id: &Id) -> Ident[src]

Convert a parameter name from its Id name to its Rust Ident representation.

pub fn func_ptr_binding(&self, id: &Id) -> Ident[src]

For when you need a {name}_ptr binding for passing a value by reference:

pub fn func_len_binding(&self, id: &Id) -> Ident[src]

For when you need a {name}_len binding for passing an array:

pub fn user_error_conversion_method(&self, user_type: &UserErrorType) -> Ident[src]

Auto Trait Implementations

impl RefUnwindSafe for Names

impl !Send for Names

impl !Sync for Names

impl Unpin for Names

impl UnwindSafe for Names

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.