pub trait FallibleTypeFolder: Sized {
type Error;
// Provided methods
fn try_fold_binder<T: TypeFoldable>(
&mut self,
t: &Binder<T>,
) -> Result<Binder<T>, Self::Error> { ... }
fn try_fold_sort(&mut self, sort: &Sort) -> Result<Sort, Self::Error> { ... }
fn try_fold_ty(&mut self, ty: &Ty) -> Result<Ty, Self::Error> { ... }
fn try_fold_bty(&mut self, bty: &BaseTy) -> Result<BaseTy, Self::Error> { ... }
fn try_fold_subset_ty(
&mut self,
constr: &SubsetTy,
) -> Result<SubsetTy, Self::Error> { ... }
fn try_fold_region(&mut self, re: &Region) -> Result<Region, Self::Error> { ... }
fn try_fold_const(&mut self, c: &Const) -> Result<Const, Self::Error> { ... }
fn try_fold_expr(&mut self, expr: &Expr) -> Result<Expr, Self::Error> { ... }
}
Required Associated Types§
Provided Methods§
fn try_fold_binder<T: TypeFoldable>( &mut self, t: &Binder<T>, ) -> Result<Binder<T>, Self::Error>
fn try_fold_sort(&mut self, sort: &Sort) -> Result<Sort, Self::Error>
fn try_fold_ty(&mut self, ty: &Ty) -> Result<Ty, Self::Error>
fn try_fold_bty(&mut self, bty: &BaseTy) -> Result<BaseTy, Self::Error>
fn try_fold_subset_ty( &mut self, constr: &SubsetTy, ) -> Result<SubsetTy, Self::Error>
fn try_fold_region(&mut self, re: &Region) -> Result<Region, Self::Error>
fn try_fold_const(&mut self, c: &Const) -> Result<Const, Self::Error>
fn try_fold_expr(&mut self, expr: &Expr) -> Result<Expr, Self::Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.