[−][src]Struct core_extensions::slices::KeySlice
KeySlice is a pair of (slice,key) returned from the (R)SplitSliceWhile iterators.
slice
is the slice in which mapper
returned the same key for every character.
key
is the last value returned by mapper
mapper
is a closure of the type impl FnMut(&'a T) -> U
Fields
slice: &'a [T]
The slice where the sequence of values returned by mapper
compared equal.
key: U
The last value that compared equal (in a sequence) returned by mapper
.
Methods
impl<'a, T, U> KeySlice<'a, T, U>
[src]
pub fn slice(&self) -> &'a [T]
[src]
Accessor for the underlying &'a [T]
.
pub fn into_pair(self) -> (U, &'a [T])
[src]
Converts this KeySlice into a key/slice pair.
Trait Implementations
impl<'a, T: Clone + 'a, U: Clone> Clone for KeySlice<'a, T, U>
[src]
impl<'a, T: Eq + 'a, U: Eq> Eq for KeySlice<'a, T, U>
[src]
impl<'a, T: Ord + 'a, U: Ord> Ord for KeySlice<'a, T, U>
[src]
fn cmp(&self, other: &KeySlice<'a, T, U>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<'a, T: PartialEq + 'a, U: PartialEq> PartialEq<KeySlice<'a, T, U>> for KeySlice<'a, T, U>
[src]
fn eq(&self, other: &KeySlice<'a, T, U>) -> bool
[src]
fn ne(&self, other: &KeySlice<'a, T, U>) -> bool
[src]
impl<'a, T: PartialOrd + 'a, U: PartialOrd> PartialOrd<KeySlice<'a, T, U>> for KeySlice<'a, T, U>
[src]
fn partial_cmp(&self, other: &KeySlice<'a, T, U>) -> Option<Ordering>
[src]
fn lt(&self, other: &KeySlice<'a, T, U>) -> bool
[src]
fn le(&self, other: &KeySlice<'a, T, U>) -> bool
[src]
fn gt(&self, other: &KeySlice<'a, T, U>) -> bool
[src]
fn ge(&self, other: &KeySlice<'a, T, U>) -> bool
[src]
impl<'a, T: Debug + 'a, U: Debug> Debug for KeySlice<'a, T, U>
[src]
impl<'a, T: 'a, U> StructuralPartialEq for KeySlice<'a, T, U>
[src]
impl<'a, T: 'a, U> StructuralEq for KeySlice<'a, T, U>
[src]
Auto Trait Implementations
impl<'a, T, U> Send for KeySlice<'a, T, U> where
T: Sync,
U: Send,
T: Sync,
U: Send,
impl<'a, T, U> Sync for KeySlice<'a, T, U> where
T: Sync,
U: Sync,
T: Sync,
U: Sync,
impl<'a, T, U> Unpin for KeySlice<'a, T, U> where
U: Unpin,
U: Unpin,
impl<'a, T, U> UnwindSafe for KeySlice<'a, T, U> where
T: RefUnwindSafe,
U: UnwindSafe,
T: RefUnwindSafe,
U: UnwindSafe,
impl<'a, T, U> RefUnwindSafe for KeySlice<'a, T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
Blanket Implementations
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The error type returned when the conversion fails.
fn try_into(Self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,