Struct core_extensions::strings::KeyStr[][src]

pub struct KeyStr<'a, T> {
    pub str: &'a str,
    pub key: T,
}

KeyStr is a pair of (str_slice,key) returned from the (R)SplitWhile iterators.

str_slice is the string 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(char) -> T

Fields

The string slice where the sequence of values returned by mapper compared equal.

The last value that compared equal (in a sequence) returned by mapper .

Methods

impl<'a, T> KeyStr<'a, T>
[src]

Accessor for the underlying &'a str.

Trait Implementations

impl<'a, T: Debug> Debug for KeyStr<'a, T>
[src]

Formats the value using the given formatter. Read more

impl<'a, T: Clone> Clone for KeyStr<'a, T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, T: Eq> Eq for KeyStr<'a, T>
[src]

impl<'a, T: PartialEq> PartialEq for KeyStr<'a, T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a, T: Ord> Ord for KeyStr<'a, T>
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<'a, T: PartialOrd> PartialOrd for KeyStr<'a, T>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

impl<'a, T> Send for KeyStr<'a, T> where
    T: Send

impl<'a, T> Sync for KeyStr<'a, T> where
    T: Sync