pub fn try_bisect<F, E, L, R>(&self, f: F, indices: Indices) -> Result<Step<L, R>, E>
    where
        F: FnOnce(&T) -> Result<ConvergeTo<L, R>, E>,
    {
        let Indices { left, right } = indices;

        if left == right {
            return Ok(Step {
                indices,
                result: None,
            });
        }

        let middle = indices.middle();

        match f(&self.view[middle])? {
            ConvergeTo::Left(out) => Ok(Step {
                indices: Indices {
                    left,
                    right: middle,
                },
                result: Some(ConvergeTo::Left(out)),
            }),
            ConvergeTo::Right(out) => Ok(Step {
                indices: Indices {
                    left: middle + 1,
                    right,
                },
                result: Some(ConvergeTo::Right(out)),
            }),
        }
    }
/// This method can be used when the convergence function is fallible.
/// Otherwise exactly the same as [`Bisector::bisect`].
///
/// When the bisection is already in a converged state for the given indices,
/// the method returns with an Ok Result.
///
/// [`Bisector::bisect`]: crate::Bisector::bisect
This method can be used when the convergence function is fallible.
Otherwise exactly the same as [`Bisector::bisect`].

When the bisection is already in a converged state for the given indices,
the method returns with an Ok Result.


This method can be used when the convergence function is fallible . Otherwise exactly the same as [ ` Bisector :: bisect ` ] . When the bisection is already in a converged state for the given indices the method returns with an Ok Result .
pub fn try_bisect<F, E, L, R>(&self, f: F, indices: Indices) -> Result<Step<L, R>, E>
    where
        F: FnOnce(&T) -> Result<ConvergeTo<L, R>, E>,
    {
        let Indices { left, right } = indices;
        if left == right {
            return Ok(Step {
                indices,
                result: None,
            });
        }
        let middle = indices.middle();
        match f(&self.view[middle])? {
            ConvergeTo::Left(out) => Ok(Step {
                indices: Indices {
                    left,
                    right: middle,
                },
                result: Some(ConvergeTo::Left(out)),
            }),
            ConvergeTo::Right(out) => Ok(Step {
                indices: Indices {
                    left: middle + 1,
                    right,
                },
                result: Some(ConvergeTo::Right(out)),
            }),
        }
    }
pub fn try_bisect < F , E , L , R > ( & self , f : F , indices : Indices ) -> Result < Step < L , R > , E > where F : FnOnce ( & T ) -> Result < ConvergeTo < L , R > , E > , { let Indices { left , right } = indices ; if left == right { return Ok ( Step { indices , result : None , } ) ; } let middle = indices . middle ( ) ; match f ( & self . view [ middle ] ) ? { ConvergeTo :: Left ( out ) => Ok ( Step { indices : Indices { left , right : middle , } , result : Some ( ConvergeTo :: Left ( out ) ) , } ) , ConvergeTo :: Right ( out ) => Ok ( Step { indices : Indices { left : middle + 1 , right , } , result : Some ( ConvergeTo :: Right ( out ) ) , } ) , } }
This method can be used when the convergence function is fallible.
This method can be used when the convergence function is fallible .
&self
f
F
indices
Indices