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 guards: Vec<GuardClause>,
pub parens: Option<(Token, Token)>,
}
Fields§
§non_defaults: Vec<NonDefaultParamSignature>
§var_params: Option<Box<NonDefaultParamSignature>>
§defaults: Vec<DefaultParamSignature>
§guards: Vec<GuardClause>
§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>, guards: Vec<GuardClause>, 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§impl NoTypeDisplay for Params
impl NoTypeDisplay for Params
fn to_string_notype(&self) -> String
source§impl PartialEq for Params
impl PartialEq 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