Enum erg_parser::ast::TypeBoundSpec
source · pub enum TypeBoundSpec {
Omitted(VarName),
NonDefault {
lhs: Token,
spec: TypeSpecWithOp,
},
WithDefault {
lhs: Token,
spec: Box<TypeSpecWithOp>,
default: ConstExpr,
},
}
Variants§
Implementations§
source§impl TypeBoundSpec
impl TypeBoundSpec
pub fn non_default(lhs: Token, spec: TypeSpecWithOp) -> Self
Trait Implementations§
source§impl Clone for TypeBoundSpec
impl Clone for TypeBoundSpec
source§fn clone(&self) -> TypeBoundSpec
fn clone(&self) -> TypeBoundSpec
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 TypeBoundSpec
impl Debug for TypeBoundSpec
source§impl Display for TypeBoundSpec
impl Display for TypeBoundSpec
source§impl FromIterator<TypeBoundSpec> for TypeBoundSpecs
impl FromIterator<TypeBoundSpec> for TypeBoundSpecs
source§fn from_iter<I: IntoIterator<Item = TypeBoundSpec>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = TypeBoundSpec>>(iter: I) -> Self
Creates a value from an iterator. Read more
source§impl Hash for TypeBoundSpec
impl Hash for TypeBoundSpec
source§impl Locational for TypeBoundSpec
impl Locational for TypeBoundSpec
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 NestedDisplay for TypeBoundSpec
impl NestedDisplay for TypeBoundSpec
source§impl PartialEq<TypeBoundSpec> for TypeBoundSpec
impl PartialEq<TypeBoundSpec> for TypeBoundSpec
source§fn eq(&self, other: &TypeBoundSpec) -> bool
fn eq(&self, other: &TypeBoundSpec) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.