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> { ... }
}
Expand description
A trait to mutate a type.
Provided Methods§
Sourcefn mutate_vec(&mut self, ty: &[Ty], pol: bool) -> Option<Interned<Vec<Ty>>>
fn mutate_vec(&mut self, ty: &[Ty], pol: bool) -> Option<Interned<Vec<Ty>>>
Mutates the given vector of types.
Sourcefn mutate_option(&mut self, ty: Option<&Ty>, pol: bool) -> Option<Option<Ty>>
fn mutate_option(&mut self, ty: Option<&Ty>, pol: bool) -> Option<Option<Ty>>
Mutates the given option of type.
Sourcefn mutate_func(&mut self, ty: &Interned<SigTy>, pol: bool) -> Option<SigTy>
fn mutate_func(&mut self, ty: &Interned<SigTy>, pol: bool) -> Option<SigTy>
Mutates the given function signature.
Sourcefn mutate_param(
&mut self,
param: &Interned<ParamTy>,
pol: bool,
) -> Option<ParamTy>
fn mutate_param( &mut self, param: &Interned<ParamTy>, pol: bool, ) -> Option<ParamTy>
Mutates the given parameter type.
Sourcefn mutate_record(
&mut self,
record: &Interned<RecordTy>,
pol: bool,
) -> Option<RecordTy>
fn mutate_record( &mut self, record: &Interned<RecordTy>, pol: bool, ) -> Option<RecordTy>
Mutates the given record type.
Sourcefn mutate_with_sig(
&mut self,
ty: &Interned<SigWithTy>,
pol: bool,
) -> Option<SigWithTy>
fn mutate_with_sig( &mut self, ty: &Interned<SigWithTy>, pol: bool, ) -> Option<SigWithTy>
Mutates the given function signature with type.
Sourcefn mutate_unary(
&mut self,
ty: &Interned<TypeUnary>,
pol: bool,
) -> Option<TypeUnary>
fn mutate_unary( &mut self, ty: &Interned<TypeUnary>, pol: bool, ) -> Option<TypeUnary>
Mutates the given unary type.
Sourcefn mutate_binary(
&mut self,
ty: &Interned<TypeBinary>,
pol: bool,
) -> Option<TypeBinary>
fn mutate_binary( &mut self, ty: &Interned<TypeBinary>, pol: bool, ) -> Option<TypeBinary>
Mutates the given binary type.