pub struct DefParam<'a, P>where
P: AstPayload,{
pub ident: &'a Spanned<AssignIdentP<P>>,
pub kind: DefParamKind<'a, P>,
pub ty: Option<&'a Spanned<TypeExprP<P>>>,
}Expand description
One function parameter.
Fields§
§ident: &'a Spanned<AssignIdentP<P>>Name of the parameter.
kind: DefParamKind<'a, P>Whether this is a regular parameter (with optional default) or a varargs construct (*args, **kwargs).
ty: Option<&'a Spanned<TypeExprP<P>>>Type of the parameter. This is None when a type is not specified.
Auto Trait Implementations§
impl<'a, P> Freeze for DefParam<'a, P>
impl<'a, P> RefUnwindSafe for DefParam<'a, P>where
<P as AstPayload>::IdentAssignPayload: RefUnwindSafe,
<P as AstPayload>::TypeExprPayload: RefUnwindSafe,
<P as AstPayload>::DefPayload: RefUnwindSafe,
<P as AstPayload>::IdentPayload: RefUnwindSafe,
impl<'a, P> Send for DefParam<'a, P>where
<P as AstPayload>::IdentAssignPayload: Sync,
<P as AstPayload>::TypeExprPayload: Sync,
<P as AstPayload>::DefPayload: Sync,
<P as AstPayload>::IdentPayload: Sync,
impl<'a, P> Sync for DefParam<'a, P>where
<P as AstPayload>::IdentAssignPayload: Sync,
<P as AstPayload>::TypeExprPayload: Sync,
<P as AstPayload>::DefPayload: Sync,
<P as AstPayload>::IdentPayload: Sync,
impl<'a, P> Unpin for DefParam<'a, P>
impl<'a, P> UnwindSafe for DefParam<'a, P>where
<P as AstPayload>::IdentAssignPayload: RefUnwindSafe,
<P as AstPayload>::TypeExprPayload: RefUnwindSafe,
<P as AstPayload>::DefPayload: RefUnwindSafe,
<P as AstPayload>::IdentPayload: RefUnwindSafe,
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