pub struct LocalParam {
pub name: SmallName,
pub type_expr: Option<TypeExpr>,
pub default: Option<Expr>,
}Expand description
One <input field signature> of a local callable (CIP-231): a field
name, an optional [<typed>] <value type>, and an optional
= <value expression> default (which makes the parameter optional).
Fields§
§name: SmallName§type_expr: Option<TypeExpr>The written value type, None when omitted (implicitly ANY).
Parsed and syntactically validated, deliberately not enforced at
runtime (ADR-0382).
default: Option<Expr>= <value expression>; None for a mandatory parameter. Defaults
may not reference variables (checked at parse time).
Trait Implementations§
Source§impl Clone for LocalParam
impl Clone for LocalParam
Source§impl Debug for LocalParam
impl Debug for LocalParam
Source§impl PartialEq for LocalParam
impl PartialEq for LocalParam
impl StructuralPartialEq for LocalParam
Auto Trait Implementations§
impl Forget for LocalParam
impl Freeze for LocalParam
impl Move for LocalParam
impl RefUnwindSafe for LocalParam
impl Send for LocalParam
impl Sync for LocalParam
impl Unpin for LocalParam
impl UnsafeUnpin for LocalParam
impl UnwindSafe for LocalParam
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