pub struct TypedParam {
pub is_self: bool,
pub name: String,
pub ty: QalaType,
pub default: Option<TypedExpr>,
pub span: Span,
}Expand description
one typed parameter of a function or method. mirror of ast::Param. for the
self first parameter of a method the type is the receiver’s type
(resolved by the type checker via the TypedFnDecl::type_name).
Fields§
§is_self: booltrue if this is the self first parameter of a method.
name: Stringthe parameter name ("self" when is_self).
ty: QalaTypethe resolved parameter type. for self, the receiver type
(QalaType::Named of the enclosing method’s type_name).
default: Option<TypedExpr>the = expr default value, type-checked against ty, or None.
span: Spanthe parameter’s source span (name to default, or name to type).
Trait Implementations§
Source§impl Clone for TypedParam
impl Clone for TypedParam
Source§fn clone(&self) -> TypedParam
fn clone(&self) -> TypedParam
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypedParam
impl Debug for TypedParam
Source§impl PartialEq for TypedParam
impl PartialEq for TypedParam
Source§fn eq(&self, other: &TypedParam) -> bool
fn eq(&self, other: &TypedParam) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TypedParam
Auto Trait Implementations§
impl Freeze for TypedParam
impl RefUnwindSafe for TypedParam
impl Send for TypedParam
impl Sync for TypedParam
impl Unpin for TypedParam
impl UnsafeUnpin for TypedParam
impl UnwindSafe for TypedParam
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