Struct pyo3_derive_backend::method::FnSpec
source · pub struct FnSpec<'a> {
pub tp: FnType,
pub attrs: Vec<Argument>,
pub args: Vec<FnArg<'a>>,
pub output: Type,
}Fields
tp: FnTypeattrs: Vec<Argument>args: Vec<FnArg<'a>>output: TypeImplementations
sourceimpl<'a> FnSpec<'a>
impl<'a> FnSpec<'a>
sourcepub fn parse(
name: &'a Ident,
sig: &'a MethodSig,
meth_attrs: &'a mut Vec<Attribute>
) -> FnSpec<'a>
pub fn parse(
name: &'a Ident,
sig: &'a MethodSig,
meth_attrs: &'a mut Vec<Attribute>
) -> FnSpec<'a>
Parser function signature and function attributes
pub fn is_args(&self, name: &Ident) -> bool
pub fn accept_args(&self) -> bool
pub fn is_kwargs(&self, name: &Ident) -> bool
pub fn accept_kwargs(&self) -> bool
pub fn default_value(&self, name: &Ident) -> Option<TokenStream>
pub fn is_kw_only(&self, name: &Ident) -> bool
Trait Implementations
impl<'a> StructuralPartialEq for FnSpec<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for FnSpec<'a>
impl<'a> !Send for FnSpec<'a>
impl<'a> !Sync for FnSpec<'a>
impl<'a> Unpin for FnSpec<'a>
impl<'a> UnwindSafe for FnSpec<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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