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_params: Option<Box<NonDefaultParamSignature>>, defaults: Vec<DefaultParamSignature>, parens: Option<(Token, Token)> ) -> Self
pub fn empty() -> Self
pub fn single(sig: NonDefaultParamSignature) -> 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.fn ln_begin(&self) -> Option<u32>
fn ln_end(&self) -> Option<u32>
fn col_begin(&self) -> Option<u32>
fn col_end(&self) -> Option<u32>
source§impl NoTypeDisplay for Params
impl NoTypeDisplay for Params
fn to_string_notype(&self) -> String
source§impl PartialEq<Params> for Params
impl PartialEq<Params> for Params
impl Eq for Params
impl StructuralEq for Params
impl StructuralPartialEq for Params
Auto Trait Implementations§
impl !RefUnwindSafe for Params
impl !Send for Params
impl !Sync for Params
impl Unpin for Params
impl !UnwindSafe for Params
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