Struct erg_parser::ast::ParamSignature
source · [−]pub struct ParamSignature {
pub pat: ParamPattern,
pub t_spec: Option<TypeSpecWithOp>,
pub opt_default_val: Option<ConstExpr>,
}
Expand description
Once the default_value is set to Some, all subsequent values must be Some
Fields
pat: ParamPattern
t_spec: Option<TypeSpecWithOp>
opt_default_val: Option<ConstExpr>
Implementations
sourceimpl ParamSignature
impl ParamSignature
pub const fn new(
pat: ParamPattern,
t_spec: Option<TypeSpecWithOp>,
opt_default_val: Option<ConstExpr>
) -> Self
pub const fn inspect(&self) -> Option<&Str>
pub fn has_default(&self) -> bool
Trait Implementations
sourceimpl Clone for ParamSignature
impl Clone for ParamSignature
sourcefn clone(&self) -> ParamSignature
fn clone(&self) -> ParamSignature
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ParamSignature
impl Debug for ParamSignature
sourceimpl Display for ParamSignature
impl Display for ParamSignature
sourceimpl Hash for ParamSignature
impl Hash for ParamSignature
sourceimpl Locational for ParamSignature
impl Locational for ParamSignature
sourceimpl NestedDisplay for ParamSignature
impl NestedDisplay for ParamSignature
sourceimpl PartialEq<ParamSignature> for ParamSignature
impl PartialEq<ParamSignature> for ParamSignature
sourcefn eq(&self, other: &ParamSignature) -> bool
fn eq(&self, other: &ParamSignature) -> bool
impl Eq for ParamSignature
impl StructuralEq for ParamSignature
impl StructuralPartialEq for ParamSignature
Auto Trait Implementations
impl RefUnwindSafe for ParamSignature
impl !Send for ParamSignature
impl !Sync for ParamSignature
impl Unpin for ParamSignature
impl UnwindSafe for ParamSignature
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