Struct erg_parser::ast::SubrTypeSpec
source · pub struct SubrTypeSpec {
pub bounds: TypeBoundSpecs,
pub lparen: Option<Token>,
pub non_defaults: Vec<ParamTySpec>,
pub var_params: Option<Box<ParamTySpec>>,
pub defaults: Vec<DefaultParamTySpec>,
pub arrow: Token,
pub return_t: Box<TypeSpec>,
}
Fields§
§bounds: TypeBoundSpecs
§lparen: Option<Token>
§non_defaults: Vec<ParamTySpec>
§var_params: Option<Box<ParamTySpec>>
§defaults: Vec<DefaultParamTySpec>
§arrow: Token
§return_t: Box<TypeSpec>
Implementations§
source§impl SubrTypeSpec
impl SubrTypeSpec
pub fn new( bounds: TypeBoundSpecs, lparen: Option<Token>, non_defaults: Vec<ParamTySpec>, var_params: Option<ParamTySpec>, defaults: Vec<DefaultParamTySpec>, arrow: Token, return_t: TypeSpec ) -> Self
Trait Implementations§
source§impl Clone for SubrTypeSpec
impl Clone for SubrTypeSpec
source§fn clone(&self) -> SubrTypeSpec
fn clone(&self) -> SubrTypeSpec
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SubrTypeSpec
impl Debug for SubrTypeSpec
source§impl Display for SubrTypeSpec
impl Display for SubrTypeSpec
source§impl Hash for SubrTypeSpec
impl Hash for SubrTypeSpec
source§impl Locational for SubrTypeSpec
impl Locational for SubrTypeSpec
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 PartialEq<SubrTypeSpec> for SubrTypeSpec
impl PartialEq<SubrTypeSpec> for SubrTypeSpec
source§fn eq(&self, other: &SubrTypeSpec) -> bool
fn eq(&self, other: &SubrTypeSpec) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.