Struct napi_derive_backend::ast::NapiFn
source · [−]pub struct NapiFn {Show 17 fields
pub name: Ident,
pub js_name: String,
pub attrs: Vec<Attribute>,
pub args: Vec<NapiFnArgKind>,
pub ret: Option<Type>,
pub is_ret_result: bool,
pub is_async: bool,
pub fn_self: Option<FnSelf>,
pub kind: FnKind,
pub vis: Visibility,
pub parent: Option<Ident>,
pub strict: bool,
pub js_mod: Option<String>,
pub ts_args_type: Option<String>,
pub ts_return_type: Option<String>,
pub skip_typescript: bool,
pub comments: Vec<String>,
}Fields
name: Identjs_name: Stringattrs: Vec<Attribute>args: Vec<NapiFnArgKind>ret: Option<Type>is_ret_result: boolis_async: boolfn_self: Option<FnSelf>kind: FnKindvis: Visibilityparent: Option<Ident>strict: booljs_mod: Option<String>ts_args_type: Option<String>ts_return_type: Option<String>skip_typescript: boolcomments: Vec<String>Trait Implementations
sourceimpl TryToTokens for NapiFn
impl TryToTokens for NapiFn
fn try_to_tokens(&self, tokens: &mut TokenStream) -> BindgenResult<()>
fn try_to_token_stream(&self) -> BindgenResult<TokenStream>
Auto Trait Implementations
impl RefUnwindSafe for NapiFn
impl !Send for NapiFn
impl !Sync for NapiFn
impl Unpin for NapiFn
impl UnwindSafe for NapiFn
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