pub struct Param {
pub is_self: bool,
pub name: String,
pub ty: Option<TypeExpr>,
pub default: Option<Expr>,
pub span: Span,
}Expand description
one parameter of a function or method. is_self is true only for the self
first parameter of a method, which has no declared ty; every other
parameter requires a ty. default is the optional = expr default value.
Fields§
§is_self: booltrue if this is the untyped self first parameter of a method.
name: Stringthe parameter name ("self" when is_self).
ty: Option<TypeExpr>the declared type; None only when is_self.
default: Option<Expr>the = expr default value, or None.
span: Spanthe parameter’s source span (name to default, or name to type).
Trait Implementations§
impl StructuralPartialEq for Param
Auto Trait Implementations§
impl Freeze for Param
impl RefUnwindSafe for Param
impl Send for Param
impl Sync for Param
impl Unpin for Param
impl UnsafeUnpin for Param
impl UnwindSafe for Param
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