tinymist_query::ty

Trait TyMutator

Source
pub trait TyMutator {
    // Provided methods
    fn mutate(&mut self, ty: &Ty, pol: bool) -> Option<Ty> { ... }
    fn mutate_rec(&mut self, ty: &Ty, pol: bool) -> Option<Ty> { ... }
    fn mutate_vec(&mut self, ty: &[Ty], pol: bool) -> Option<Interned<Vec<Ty>>> { ... }
    fn mutate_option(
        &mut self,
        ty: Option<&Ty>,
        pol: bool,
    ) -> Option<Option<Ty>> { ... }
    fn mutate_func(&mut self, ty: &Interned<SigTy>, pol: bool) -> Option<SigTy> { ... }
    fn mutate_param(
        &mut self,
        param: &Interned<ParamTy>,
        pol: bool,
    ) -> Option<ParamTy> { ... }
    fn mutate_record(
        &mut self,
        record: &Interned<RecordTy>,
        pol: bool,
    ) -> Option<RecordTy> { ... }
    fn mutate_with_sig(
        &mut self,
        ty: &Interned<SigWithTy>,
        pol: bool,
    ) -> Option<SigWithTy> { ... }
    fn mutate_unary(
        &mut self,
        ty: &Interned<TypeUnary>,
        pol: bool,
    ) -> Option<TypeUnary> { ... }
    fn mutate_binary(
        &mut self,
        ty: &Interned<TypeBinary>,
        pol: bool,
    ) -> Option<TypeBinary> { ... }
    fn mutate_if(&mut self, ty: &Interned<IfTy>, pol: bool) -> Option<IfTy> { ... }
    fn mutate_select(
        &mut self,
        ty: &Interned<SelectTy>,
        pol: bool,
    ) -> Option<SelectTy> { ... }
}

Provided Methods§

Source

fn mutate(&mut self, ty: &Ty, pol: bool) -> Option<Ty>

Source

fn mutate_rec(&mut self, ty: &Ty, pol: bool) -> Option<Ty>

Source

fn mutate_vec(&mut self, ty: &[Ty], pol: bool) -> Option<Interned<Vec<Ty>>>

Source

fn mutate_option(&mut self, ty: Option<&Ty>, pol: bool) -> Option<Option<Ty>>

Source

fn mutate_func(&mut self, ty: &Interned<SigTy>, pol: bool) -> Option<SigTy>

Source

fn mutate_param( &mut self, param: &Interned<ParamTy>, pol: bool, ) -> Option<ParamTy>

Source

fn mutate_record( &mut self, record: &Interned<RecordTy>, pol: bool, ) -> Option<RecordTy>

Source

fn mutate_with_sig( &mut self, ty: &Interned<SigWithTy>, pol: bool, ) -> Option<SigWithTy>

Source

fn mutate_unary( &mut self, ty: &Interned<TypeUnary>, pol: bool, ) -> Option<TypeUnary>

Source

fn mutate_binary( &mut self, ty: &Interned<TypeBinary>, pol: bool, ) -> Option<TypeBinary>

Source

fn mutate_if(&mut self, ty: &Interned<IfTy>, pol: bool) -> Option<IfTy>

Source

fn mutate_select( &mut self, ty: &Interned<SelectTy>, pol: bool, ) -> Option<SelectTy>

Implementors§

Source§

impl<T> TyMutator for T
where T: FnMut(&Ty, bool) -> Option<Ty>,