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) -> &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を使う

Required Methods§

source

fn ref_t(&self) -> &Type

source

fn signature_t(&self) -> Option<&Type>

source

fn ref_mut_t(&mut self) -> &mut Type

source

fn signature_mut_t(&mut self) -> Option<&mut Type>

Provided Methods§

source

fn t(&self) -> Type

source

fn inner_ts(&self) -> Vec<Type>

source

fn lhs_t(&self) -> &Type

source

fn rhs_t(&self) -> &Type

Implementors§