pub struct KeyStr<'a, T> {
pub str: &'a str,
pub key: T,
}Available on crate feature
slices only.Expand description
A pair of (string slice, key) returned by the RSplitWhile/ SplitWhile iterators.
Fields§
§str: &'a strstr_slice is a string slice for which all characters were mapped to key by a closure.
key: TThe value that all the chars in the string slice were mapped to.
Implementations§
Trait Implementations§
Source§impl<'a, T: Ord> Ord for KeyStr<'a, T>
impl<'a, T: Ord> Ord for KeyStr<'a, T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a, T: PartialOrd> PartialOrd for KeyStr<'a, T>
impl<'a, T: PartialOrd> PartialOrd for KeyStr<'a, T>
impl<'a, T: Eq> Eq for KeyStr<'a, T>
impl<'a, T> StructuralPartialEq for KeyStr<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for KeyStr<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for KeyStr<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for KeyStr<'a, T>where
T: Send,
impl<'a, T> Sync for KeyStr<'a, T>where
T: Sync,
impl<'a, T> Unpin for KeyStr<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for KeyStr<'a, T>where
T: UnsafeUnpin,
impl<'a, T> UnwindSafe for KeyStr<'a, T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> AsPhantomData for Twhere
T: ?Sized,
impl<T> AsPhantomData for Twhere
T: ?Sized,
Source§fn as_phantom(&self) -> PhantomData<Self>
fn as_phantom(&self) -> PhantomData<Self>
Available on crate feature
phantom only.Gets a
PhantomData<Self>. Read moreSource§fn as_phantom_covariant(&self) -> PhantomData<fn() -> Self>
fn as_phantom_covariant(&self) -> PhantomData<fn() -> Self>
Available on crate feature
phantom only.Gets a
PhantomData<fn() -> Self>, a covariant PhantomData.Source§fn as_phantom_contra(&self) -> PhantomData<fn(Self)>
fn as_phantom_contra(&self) -> PhantomData<fn(Self)>
Available on crate feature
phantom only.Gets a
PhantomData<fn(Self)>, a contravariant PhantomData.Source§fn as_phantom_invariant(&self) -> PhantomData<fn(Self) -> Self>
fn as_phantom_invariant(&self) -> PhantomData<fn(Self) -> Self>
Available on crate feature
phantom only.Gets a
PhantomData<fn(Self) -> Self>, an invariant PhantomData.Source§const PHANTOM: PhantomData<Self> = PhantomData
const PHANTOM: PhantomData<Self> = PhantomData
Available on crate feature
phantom only.Gets a
PhantomData<Self>. Read moreSource§const PHANTOM_COVARIANT: PhantomData<fn() -> Self> = PhantomData
const PHANTOM_COVARIANT: PhantomData<fn() -> Self> = PhantomData
Available on crate feature
phantom only.Source§const PHANTOM_CONTRA: PhantomData<fn(Self)> = PhantomData
const PHANTOM_CONTRA: PhantomData<fn(Self)> = PhantomData
Available on crate feature
phantom only.Source§const PHANTOM_INVARIANT: PhantomData<fn(Self) -> Self> = PhantomData
const PHANTOM_INVARIANT: PhantomData<fn(Self) -> Self> = PhantomData
Available on crate feature
phantom only.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CallExt for Twhere
T: ?Sized,
impl<T> CallExt for Twhere
T: ?Sized,
Source§fn ref_call<P>(&self, params: P) -> Self::Returnswhere
Self: CallRef<P>,
fn ref_call<P>(&self, params: P) -> Self::Returnswhere
Self: CallRef<P>,
Available on crate feature
callable only.For calling
CallRef::ref_call_,
with the ability to specify the types of the arguments.. Read moreSource§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> SelfOps for Twhere
T: ?Sized,
impl<T> SelfOps for Twhere
T: ?Sized,
Source§fn piped<F, U>(self, f: F) -> U
fn piped<F, U>(self, f: F) -> U
Available on crate feature
self_ops only.Emulates the pipeline operator, allowing method syntax in more places. Read more
Source§fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
fn piped_ref<'a, F, U>(&'a self, f: F) -> Uwhere
F: FnOnce(&'a Self) -> U,
Available on crate feature
self_ops only.The same as
piped except that the function takes &Self
Useful for functions that take &Self instead of Self. Read moreSource§fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
fn piped_mut<'a, F, U>(&'a mut self, f: F) -> Uwhere
F: FnOnce(&'a mut Self) -> U,
Available on crate feature
self_ops only.The same as
piped, except that the function takes &mut Self.
Useful for functions that take &mut Self instead of Self.Source§fn mutated<F>(self, f: F) -> Self
fn mutated<F>(self, f: F) -> Self
Available on crate feature
self_ops only.Mutates self using a closure taking self by mutable reference,
passing it along the method chain. Read more
Source§fn observe<F>(self, f: F) -> Self
fn observe<F>(self, f: F) -> Self
Available on crate feature
self_ops only.Observes the value of self, passing it along unmodified.
Useful in long method chains. Read more
Source§fn as_ref_<T: ?Sized>(&self) -> &Twhere
Self: AsRef<T>,
fn as_ref_<T: ?Sized>(&self) -> &Twhere
Self: AsRef<T>,
Available on crate feature
self_ops only.Performs a reference to reference conversion with
AsRef,
using the turbofish .as_ref_::<_>() syntax. Read moreSource§impl<T> TypeIdentity for Twhere
T: ?Sized,
impl<T> TypeIdentity for Twhere
T: ?Sized,
Source§fn into_type(self) -> Self::Type
fn into_type(self) -> Self::Type
Available on crate feature
type_identity only.Converts a value back to the original type.
Source§fn as_type(&self) -> &Self::Type
fn as_type(&self) -> &Self::Type
Available on crate feature
type_identity only.Converts a reference back to the original type.
Source§fn as_type_mut(&mut self) -> &mut Self::Type
fn as_type_mut(&mut self) -> &mut Self::Type
Available on crate feature
type_identity only.Converts a mutable reference back to the original type.
Source§fn into_type_box(self: Box<Self>) -> Box<Self::Type>
fn into_type_box(self: Box<Self>) -> Box<Self::Type>
Available on crate features
type_identity and alloc only.Converts a box back to the original type.
Source§fn into_type_arc(self: Arc<Self>) -> Arc<Self::Type>
fn into_type_arc(self: Arc<Self>) -> Arc<Self::Type>
Available on crate features
type_identity and alloc only.Converts an Arc back to the original type. Read more
Source§fn into_type_rc(self: Rc<Self>) -> Rc<Self::Type>
fn into_type_rc(self: Rc<Self>) -> Rc<Self::Type>
Available on crate features
type_identity and alloc only.Converts an Rc back to the original type. Read more
Source§fn from_type(this: Self::Type) -> Self
fn from_type(this: Self::Type) -> Self
Available on crate feature
type_identity only.Converts a value back to the original type.
Source§fn from_type_ref(this: &Self::Type) -> &Self
fn from_type_ref(this: &Self::Type) -> &Self
Available on crate feature
type_identity only.Converts a reference back to the original type.
Source§fn from_type_mut(this: &mut Self::Type) -> &mut Self
fn from_type_mut(this: &mut Self::Type) -> &mut Self
Available on crate feature
type_identity only.Converts a mutable reference back to the original type.
Source§fn from_type_box(this: Box<Self::Type>) -> Box<Self>
fn from_type_box(this: Box<Self::Type>) -> Box<Self>
Available on crate features
type_identity and alloc only.Converts a box back to the original type.