Trait odds::slice::SliceFindSplit [] [src]

pub trait SliceFindSplit {
    type Item;
    fn find_split<U: ?Sized>(&self, elt: &U) -> (&Self, &Self)
    where
        Self::Item: PartialEq<U>
;
fn rfind_split<U: ?Sized>(&self, elt: &U) -> (&Self, &Self)
    where
        Self::Item: PartialEq<U>
;
fn find_split_mut<U: ?Sized>(&mut self, elt: &U) -> (&mut Self, &mut Self)
    where
        Self::Item: PartialEq<U>
;
fn rfind_split_mut<U: ?Sized>(&mut self, elt: &U) -> (&mut Self, &mut Self)
    where
        Self::Item: PartialEq<U>
; }

Element-finding methods for slices

Associated Types

Required Methods

Linear search for the first occurrence elt in the slice.

Return the part before and the part including and after the element. If the element is not found, the second half is empty.

Linear search for the last occurrence elt in the slice.

Return the part before and the part including and after the element. If the element is not found, the first half is empty.

Linear search for the first occurrence elt in the slice.

Return the part before and the part including and after the element. If the element is not found, the second half is empty.

Linear search for the last occurrence elt in the slice.

Return the part before and the part including and after the element. If the element is not found, the first half is empty.

Implementations on Foreign Types

impl<T> SliceFindSplit for [T]
[src]

[src]

[src]

[src]

[src]

Implementors