[][src]Struct wasm_bindgen_backend::ast::ImportFunction

pub struct ImportFunction {
    pub function: Function,
    pub rust_name: Ident,
    pub js_ret: Option<Type>,
    pub catch: bool,
    pub variadic: bool,
    pub structural: bool,
    pub kind: ImportFunctionKind,
    pub shim: Ident,
    pub doc_comment: Option<String>,
}

Fields

function: Functionrust_name: Identjs_ret: Option<Type>catch: boolvariadic: boolstructural: boolkind: ImportFunctionKindshim: Identdoc_comment: Option<String>

Methods

impl ImportFunction[src]

pub fn infer_getter_property(&self) -> &str[src]

If the rust object has a fn xxx(&self) -> MyType method, get the name for a getter in javascript (in this case xxx, so you can write val = obj.xxx)

pub fn infer_setter_property(&self) -> Result<String, Diagnostic>[src]

If the rust object has a fn set_xxx(&mut self, MyType) style method, get the name for a setter in javascript (in this case xxx, so you can write obj.xxx = val)

Trait Implementations

impl TryToTokens for ImportFunction[src]

impl ImportedTypes for ImportFunction[src]

impl Clone for ImportFunction[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl !Send for ImportFunction

impl Unpin for ImportFunction

impl !Sync for ImportFunction

impl UnwindSafe for ImportFunction

impl !RefUnwindSafe for ImportFunction

Blanket Implementations

impl<T> ImportedTypeDefinitions for T where
    T: ImportedTypes
[src]

impl<T> ImportedTypeReferences for T where
    T: ImportedTypes
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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.

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

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

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