Enum wasm_bindgen_backend::ast::ImportKind
source · pub enum ImportKind {
Function(ImportFunction),
Static(ImportStatic),
Type(ImportType),
Enum(ImportEnum),
}
Expand description
The type of item being imported
Variants§
Function(ImportFunction)
Importing a function
Static(ImportStatic)
Importing a static value
Type(ImportType)
Importing a type/class
Enum(ImportEnum)
Importing a JS enum
Implementations§
source§impl ImportKind
impl ImportKind
sourcepub fn fits_on_impl(&self) -> bool
pub fn fits_on_impl(&self) -> bool
Whether this type can be inside an impl
block.
Trait Implementations§
source§impl Clone for ImportKind
impl Clone for ImportKind
source§fn clone(&self) -> ImportKind
fn clone(&self) -> ImportKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl TryToTokens for ImportKind
impl TryToTokens for ImportKind
source§fn try_to_tokens(&self, tokens: &mut TokenStream) -> Result<(), Diagnostic>
fn try_to_tokens(&self, tokens: &mut TokenStream) -> Result<(), Diagnostic>
Attempt to convert a
Self
into tokens and add it to the TokenStream
source§fn try_to_token_stream(&self) -> Result<TokenStream, Diagnostic>
fn try_to_token_stream(&self) -> Result<TokenStream, Diagnostic>
Attempt to convert a
Self
into a new TokenStream