pub enum ImportKind {
Function(ImportFunction),
Static(ImportStatic),
String(ImportString),
Type(ImportType),
Enum(StringEnum),
}
Expand description
The type of item being imported
Variants§
Function(ImportFunction)
Importing a function
Static(ImportStatic)
Importing a static value
String(ImportString)
Importing a static string
Type(ImportType)
Importing a type/class
Enum(StringEnum)
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
Auto Trait Implementations§
impl Freeze for ImportKind
impl RefUnwindSafe for ImportKind
impl !Send for ImportKind
impl !Sync for ImportKind
impl Unpin for ImportKind
impl UnwindSafe for ImportKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)