Trait Bisect

Source
pub trait Bisect: Clone {
    // Required method
    fn middle_point(&self, other: &Self) -> Option<Self>;
}
Expand description

binary search helper

Required Methods§

Source

fn middle_point(&self, other: &Self) -> Option<Self>

Return between two elements if search is not end.

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.

Implementations on Foreign Types§

Source§

impl Bisect for f32

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for f64

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for i8

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for i16

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for i32

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for i64

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for i128

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for isize

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for u8

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for u16

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for u32

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for u64

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for u128

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Source§

impl Bisect for usize

Source§

fn middle_point(&self, other: &Self) -> Option<Self>

Implementors§