Struct erg_compiler::hir::Params
source · pub struct Params {
pub non_defaults: Vec<NonDefaultParamSignature>,
pub var_params: Option<Box<NonDefaultParamSignature>>,
pub defaults: Vec<DefaultParamSignature>,
pub parens: Option<(Token, Token)>,
}
Fields§
§non_defaults: Vec<NonDefaultParamSignature>
§var_params: Option<Box<NonDefaultParamSignature>>
§defaults: Vec<DefaultParamSignature>
§parens: Option<(Token, Token)>
Implementations§
source§impl Params
impl Params
pub const fn new( non_defaults: Vec<NonDefaultParamSignature>, var_args: Option<Box<NonDefaultParamSignature>>, defaults: Vec<DefaultParamSignature>, parens: Option<(Token, Token)> ) -> Self
pub const fn ref_deconstruct( &self ) -> (&'_ Vec<NonDefaultParamSignature>, &'_ Option<Box<NonDefaultParamSignature>>, &'_ Vec<DefaultParamSignature>, &'_ Option<(Token, Token)>)
pub fn deconstruct( self ) -> (Vec<NonDefaultParamSignature>, Option<Box<NonDefaultParamSignature>>, Vec<DefaultParamSignature>, Option<(Token, Token)>)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
source§impl Locational for Params
impl Locational for Params
source§fn loc(&self) -> Location
fn loc(&self) -> Location
NOTE:
loc
cannot be treated as a light method when self
is a large grammatical element.
If possible, delay the computation by passing &impl Locational
or other means.