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
sourceimpl 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
sourceimpl Clone for ImportKind
impl Clone for ImportKind
sourcefn clone(&self) -> ImportKind
fn clone(&self) -> ImportKind
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl TryToTokens for ImportKind
impl TryToTokens for ImportKind
sourcefn 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
sourcefn 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
Auto Trait Implementations
impl RefUnwindSafe for ImportKind
impl !Send for ImportKind
impl !Sync for ImportKind
impl Unpin for ImportKind
impl UnwindSafe for ImportKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more