Trait erg_compiler::ty::HasType
source · pub trait HasType {
// Required methods
fn ref_t(&self) -> &Type;
fn signature_t(&self) -> Option<&Type>;
fn ref_mut_t(&mut self) -> Option<&mut Type>;
fn signature_mut_t(&mut self) -> Option<&mut Type>;
// Provided methods
fn t(&self) -> Type { ... }
fn inner_ts(&self) -> Vec<Type> { ... }
fn lhs_t(&self) -> &Type { ... }
fn rhs_t(&self) -> &Type { ... }
}
Expand description
cloneのコストがあるためなるべく.ref_tを使うようにすること いくつかの構造体は直接Typeを保持していないので、その場合は.tを使う