Struct erg_compiler::hir::TypeAscription
source · pub struct TypeAscription {
pub expr: Box<Expr>,
pub spec: TypeSpecWithOp,
}
Fields§
§expr: Box<Expr>
§spec: TypeSpecWithOp
Implementations§
source§impl TypeAscription
impl TypeAscription
pub fn new(expr: Expr, spec: TypeSpecWithOp) -> Self
Trait Implementations§
source§impl Clone for TypeAscription
impl Clone for TypeAscription
source§fn clone(&self) -> TypeAscription
fn clone(&self) -> TypeAscription
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 TypeAscription
impl Debug for TypeAscription
source§impl Display for TypeAscription
impl Display for TypeAscription
source§impl HasType for TypeAscription
impl HasType for TypeAscription
fn ref_t(&self) -> &Type
fn ref_mut_t(&mut self) -> &mut Type
fn signature_t(&self) -> Option<&Type>
fn signature_mut_t(&mut self) -> Option<&mut Type>
fn t(&self) -> Type
fn inner_ts(&self) -> Vec<Type>
fn lhs_t(&self) -> &Type
fn rhs_t(&self) -> &Type
source§impl Hash for TypeAscription
impl Hash for TypeAscription
source§impl Locational for TypeAscription
impl Locational for TypeAscription
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 TypeAscription
impl NestedDisplay for TypeAscription
source§impl NoTypeDisplay for TypeAscription
impl NoTypeDisplay for TypeAscription
fn to_string_notype(&self) -> String
source§impl PartialEq<TypeAscription> for TypeAscription
impl PartialEq<TypeAscription> for TypeAscription
source§fn eq(&self, other: &TypeAscription) -> bool
fn eq(&self, other: &TypeAscription) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.