Struct wasm_bindgen_backend::ast::Export [−][src]
pub struct Export { pub class: Option<Ident>, pub method_self: Option<MethodSelf>, pub constructor: Option<String>, pub function: Function, pub comments: Vec<String>, pub rust_name: Ident, }
A rust to js interface. Allows interaction with rust objects/functions from javascript.
Fields
class: Option<Ident>
The javascript class name.
method_self: Option<MethodSelf>
The type of self
(either self
, &self
, or &mut self
)
constructor: Option<String>
The name of the constructor function (e.g. new).
This allows javascript to expose an Object
interface, where calling
the constructor maps correctly to rust.
function: Function
The rust function
comments: Vec<String>
Comments extracted from the rust source.
rust_name: Ident
The name of the rust function/method on the rust side.
Trait Implementations
impl Clone for Export
[src]
impl Clone for Export
fn clone(&self) -> Export
[src]
fn clone(&self) -> Export
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl TryToTokens for Export
[src]
impl TryToTokens for Export
fn try_to_tokens(
self: &Export,
into: &mut TokenStream
) -> Result<(), Diagnostic>
[src]
fn try_to_tokens(
self: &Export,
into: &mut TokenStream
) -> Result<(), Diagnostic>
fn try_to_token_stream(&self) -> Result<TokenStream, Diagnostic>
[src]
fn try_to_token_stream(&self) -> Result<TokenStream, Diagnostic>