[][src]Struct wasm_bindgen_backend::ast::Program

pub struct Program {
    pub exports: Vec<Export>,
    pub imports: Vec<Import>,
    pub enums: Vec<Enum>,
    pub structs: Vec<Struct>,
    pub consts: Vec<Const>,
    pub dictionaries: Vec<Dictionary>,
    pub typescript_custom_sections: Vec<String>,
    pub inline_js: Vec<String>,
}

An abstract syntax tree representing a rust program. Contains extra information for joining up this rust code with javascript.

Fields

exports: Vec<Export>

rust -> js interfaces

imports: Vec<Import>

js -> rust interfaces

enums: Vec<Enum>

rust enums

structs: Vec<Struct>

rust structs

consts: Vec<Const>

rust consts

dictionaries: Vec<Dictionary>

"dictionaries", generated for WebIDL, which are basically just "typed objects" in the sense that they represent a JS object with a particular shape in JIT parlance.

typescript_custom_sections: Vec<String>

custom typescript sections to be included in the definition file

inline_js: Vec<String>

Inline JS snippets

Trait Implementations

impl Clone for Program[src]

impl Default for Program[src]

impl ImportedTypes for Program[src]

impl RemoveUndefinedImports for Program[src]

impl TryToTokens for Program[src]

Auto Trait Implementations

impl !RefUnwindSafe for Program

impl !Send for Program

impl !Sync for Program

impl Unpin for Program

impl UnwindSafe for Program

Blanket Implementations

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

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

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

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

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> 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.