pub trait Approx: Sized {
    type Approximation;
    type Cache: Default;

    fn approx_with_cache(
        self,
        tolerance: impl Into<Tolerance>,
        cache: &mut Self::Cache
    ) -> Self::Approximation; fn approx(self, tolerance: impl Into<Tolerance>) -> Self::Approximation { ... } }
Expand description

Approximate an object

Required Associated Types

The approximation of the object

The cache used to cache approximation results

Required Methods

Approximate the object, using the provided cache

This is a lower-level method that allows some degree of control over caching. Callers might consider using Approx::approx instead.

Provided Methods

Approximate the object

tolerance defines how far the approximation is allowed to deviate from the actual object.

Implementations on Foreign Types

Implementors