pub struct Graphemes<'a> { /* fields omitted */ }
External iterator for a string’sgrapheme clusters.
This struct is created by thegraphemes
method on theUnicodeSegmentation
trait. See itsdocumentation for more.
impl<'a>Graphemes<'a>
[src]pub fnas_str(&self) -> &'a str
[src]View the underlying data (the part yet to be iterated) as a slice of the original string.
letmutiter="abc".graphemes(true);assert_eq!(iter.as_str(),"abc");iter.next();assert_eq!(iter.as_str(),"bc");iter.next();iter.next();assert_eq!(iter.as_str(),"");
impl<'a>Clone forGraphemes<'a>
[src]fnclone(&self) ->Graphemes<'a>ⓘ
[src]pub fnclone_from(&mut self, source: &Self)
1.0.0[src]impl<'a>Debug forGraphemes<'a>
[src]impl<'a>DoubleEndedIterator forGraphemes<'a>
[src]fnnext_back(&mut self) ->Option<&'a str>
[src]pub fnadvance_back_by(&mut self, n: usize) ->Result<(), usize>
[src]iter_advance_by
)recently added
pub fnnth_back(&mut self, n: usize) ->Option<Self::Item>
1.37.0[src]pub fntry_rfold<B, F, R>(&mut self, init: B, f: F) -> Rwhere
F:FnMut(B, Self::Item) -> R,
R:Try<Ok = B>,
1.27.0[src]pub fnrfold<B, F>(self, init: B, f: F) -> Bwhere
F:FnMut(B, Self::Item) -> B,
1.27.0[src]pub fnrfind<P>(&mut self, predicate: P) ->Option<Self::Item>where
P:FnMut(&Self::Item) -> bool,
1.27.0[src]impl<'a>Iterator forGraphemes<'a>
[src]typeItem = &'a str
The type of the elements being iterated over.
fnsize_hint(&self) -> (usize,Option<usize>)
[src]fnnext(&mut self) ->Option<&'a str>
[src]pub fncount(self) -> usize
1.0.0[src]pub fnlast(self) ->Option<Self::Item>
1.0.0[src]pub fnadvance_by(&mut self, n: usize) ->Result<(), usize>
[src]iter_advance_by
)recently added
pub fnnth(&mut self, n: usize) ->Option<Self::Item>
1.0.0[src]pub fnstep_by(self, step: usize) ->StepBy<Self>
1.28.0[src]pub fnchain<U>(self, other: U) ->Chain<Self, <U asIntoIterator>::IntoIter>where
U:IntoIterator<Item = Self::Item>,
1.0.0[src]pub fnzip<U>(self, other: U) ->Zip<Self, <U asIntoIterator>::IntoIter>where
U:IntoIterator,
1.0.0[src]pub fnintersperse(self, separator: Self::Item) ->Intersperse<Self>where
Self::Item:Clone,
[src]iter_intersperse
)recently added
pub fnintersperse_with<G>(self, separator: G) ->IntersperseWith<Self, G>where
G:FnMut() -> Self::Item,
[src]iter_intersperse
)recently added
pub fnmap<B, F>(self, f: F) ->Map<Self, F>where
F:FnMut(Self::Item) -> B,
1.0.0[src]pub fnfor_each<F>(self, f: F)where
F:FnMut(Self::Item),
1.21.0[src]pub fnfilter<P>(self, predicate: P) ->Filter<Self, P>where
P:FnMut(&Self::Item) -> bool,
1.0.0[src]pub fnfilter_map<B, F>(self, f: F) ->FilterMap<Self, F>where
F:FnMut(Self::Item) ->Option<B>,
1.0.0[src]pub fnenumerate(self) ->Enumerate<Self>
1.0.0[src]pub fnpeekable(self) ->Peekable<Self>
1.0.0[src]pub fnskip_while<P>(self, predicate: P) ->SkipWhile<Self, P>where
P:FnMut(&Self::Item) -> bool,
1.0.0[src]pub fntake_while<P>(self, predicate: P) ->TakeWhile<Self, P>where
P:FnMut(&Self::Item) -> bool,
1.0.0[src]pub fnmap_while<B, P>(self, predicate: P) ->MapWhile<Self, P>where
P:FnMut(Self::Item) ->Option<B>,
[src]iter_map_while
)recently added
pub fnskip(self, n: usize) ->Skip<Self>
1.0.0[src]pub fntake(self, n: usize) ->Take<Self>
1.0.0[src]pub fnscan<St, B, F>(self, initial_state: St, f: F) ->Scan<Self, St, F>where
F:FnMut(&mut St, Self::Item) ->Option<B>,
1.0.0[src]pub fnflat_map<U, F>(self, f: F) ->FlatMap<Self, U, F>where
F:FnMut(Self::Item) -> U,
U:IntoIterator,
1.0.0[src]pub fnflatten(self) ->Flatten<Self>where
Self::Item:IntoIterator,
1.29.0[src]pub fnfuse(self) ->Fuse<Self>
1.0.0[src]pub fninspect<F>(self, f: F) ->Inspect<Self, F>where
F:FnMut(&Self::Item),
1.0.0[src]pub fnby_ref(&mut self) -> &mut Self
1.0.0[src]#[must_use = "if you really need to exhaust the iterator, consider `.for_each(drop)` instead"]pub fncollect<B>(self) -> Bwhere
B:FromIterator<Self::Item>,
1.0.0[src]pub fnpartition<B, F>(self, f: F) -> (B, B)where
B:Default +Extend<Self::Item>,
F:FnMut(&Self::Item) -> bool,
1.0.0[src]pub fnpartition_in_place<'a, T, P>(self, predicate: P) -> usizewhere
Self:DoubleEndedIterator<Item = &'a mut T>,
T: 'a,
P:FnMut(&T) -> bool,
[src]iter_partition_in_place
)new API
pub fnis_partitioned<P>(self, predicate: P) -> boolwhere
P:FnMut(Self::Item) -> bool,
[src]iter_is_partitioned
)new API
pub fntry_fold<B, F, R>(&mut self, init: B, f: F) -> Rwhere
F:FnMut(B, Self::Item) -> R,
R:Try<Ok = B>,
1.27.0[src]pub fntry_for_each<F, R>(&mut self, f: F) -> Rwhere
F:FnMut(Self::Item) -> R,
R:Try<Ok = ()>,
1.27.0[src]pub fnfold<B, F>(self, init: B, f: F) -> Bwhere
F:FnMut(B, Self::Item) -> B,
1.0.0[src]pub fnreduce<F>(self, f: F) ->Option<Self::Item>where
F:FnMut(Self::Item, Self::Item) -> Self::Item,
1.51.0[src]pub fnall<F>(&mut self, f: F) -> boolwhere
F:FnMut(Self::Item) -> bool,
1.0.0[src]pub fnany<F>(&mut self, f: F) -> boolwhere
F:FnMut(Self::Item) -> bool,
1.0.0[src]pub fnfind<P>(&mut self, predicate: P) ->Option<Self::Item>where
P:FnMut(&Self::Item) -> bool,
1.0.0[src]pub fnfind_map<B, F>(&mut self, f: F) ->Option<B>where
F:FnMut(Self::Item) ->Option<B>,
1.30.0[src]pub fntry_find<F, R>(
&mut self,
f: F
) ->Result<Option<Self::Item>, <R asTry>::Error>where
F:FnMut(&Self::Item) -> R,
R:Try<Ok = bool>,
[src]try_find
)new API
pub fnposition<P>(&mut self, predicate: P) ->Option<usize>where
P:FnMut(Self::Item) -> bool,
1.0.0[src]pub fnrposition<P>(&mut self, predicate: P) ->Option<usize>where
Self:ExactSizeIterator +DoubleEndedIterator,
P:FnMut(Self::Item) -> bool,
1.0.0[src]pub fnmax(self) ->Option<Self::Item>where
Self::Item:Ord,
1.0.0[src]pub fnmin(self) ->Option<Self::Item>where
Self::Item:Ord,
1.0.0[src]pub fnmax_by_key<B, F>(self, f: F) ->Option<Self::Item>where
B:Ord,
F:FnMut(&Self::Item) -> B,
1.6.0[src]pub fnmax_by<F>(self, compare: F) ->Option<Self::Item>where
F:FnMut(&Self::Item, &Self::Item) ->Ordering,
1.15.0[src]pub fnmin_by_key<B, F>(self, f: F) ->Option<Self::Item>where
B:Ord,
F:FnMut(&Self::Item) -> B,
1.6.0[src]pub fnmin_by<F>(self, compare: F) ->Option<Self::Item>where
F:FnMut(&Self::Item, &Self::Item) ->Ordering,
1.15.0[src]pub fnrev(self) ->Rev<Self>where
Self:DoubleEndedIterator,
1.0.0[src]pub fnunzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self:Iterator<Item = (A, B)>,
FromA:Default +Extend<A>,
FromB:Default +Extend<B>,
1.0.0[src]pub fncopied<'a, T>(self) ->Copied<Self>where
Self:Iterator<Item = &'a T>,
T: 'a +Copy,
1.36.0[src]pub fncloned<'a, T>(self) ->Cloned<Self>where
Self:Iterator<Item = &'a T>,
T: 'a +Clone,
1.0.0[src]pub fncycle(self) ->Cycle<Self>where
Self:Clone,
1.0.0[src]pub fnsum<S>(self) -> Swhere
S:Sum<Self::Item>,
1.11.0[src]pub fnproduct<P>(self) -> Pwhere
P:Product<Self::Item>,
1.11.0[src]pub fncmp<I>(self, other: I) ->Orderingwhere
I:IntoIterator<Item = Self::Item>,
Self::Item:Ord,
1.5.0[src]pub fncmp_by<I, F>(self, other: I, cmp: F) ->Orderingwhere
I:IntoIterator,
F:FnMut(Self::Item, <I asIntoIterator>::Item) ->Ordering,
[src]iter_order_by
)pub fnpartial_cmp<I>(self, other: I) ->Option<Ordering>where
I:IntoIterator,
Self::Item:PartialOrd<<I asIntoIterator>::Item>,
1.5.0[src]pub fnpartial_cmp_by<I, F>(self, other: I, partial_cmp: F) ->Option<Ordering>where
I:IntoIterator,
F:FnMut(Self::Item, <I asIntoIterator>::Item) ->Option<Ordering>,
[src]iter_order_by
)pub fneq<I>(self, other: I) -> boolwhere
I:IntoIterator,
Self::Item:PartialEq<<I asIntoIterator>::Item>,
1.5.0[src]pub fneq_by<I, F>(self, other: I, eq: F) -> boolwhere
I:IntoIterator,
F:FnMut(Self::Item, <I asIntoIterator>::Item) -> bool,
[src]iter_order_by
)pub fnne<I>(self, other: I) -> boolwhere
I:IntoIterator,
Self::Item:PartialEq<<I asIntoIterator>::Item>,
1.5.0[src]pub fnlt<I>(self, other: I) -> boolwhere
I:IntoIterator,
Self::Item:PartialOrd<<I asIntoIterator>::Item>,
1.5.0[src]pub fnle<I>(self, other: I) -> boolwhere
I:IntoIterator,
Self::Item:PartialOrd<<I asIntoIterator>::Item>,
1.5.0[src]pub fngt<I>(self, other: I) -> boolwhere
I:IntoIterator,
Self::Item:PartialOrd<<I asIntoIterator>::Item>,
1.5.0[src]pub fnge<I>(self, other: I) -> boolwhere
I:IntoIterator,
Self::Item:PartialOrd<<I asIntoIterator>::Item>,
1.5.0[src]pub fnis_sorted(self) -> boolwhere
Self::Item:PartialOrd<Self::Item>,
[src]is_sorted
)new API
pub fnis_sorted_by<F>(self, compare: F) -> boolwhere
F:FnMut(&Self::Item, &Self::Item) ->Option<Ordering>,
[src]is_sorted
)new API
pub fnis_sorted_by_key<F, K>(self, f: F) -> boolwhere
F:FnMut(Self::Item) -> K,
K:PartialOrd<K>,
[src]is_sorted
)new API
impl<T>Any for Twhere
T: 'static + ?Sized,
[src]impl<T>Borrow<T> for Twhere
T: ?Sized,
[src]impl<T>BorrowMut<T> for Twhere
T: ?Sized,
[src]pub fnborrow_mut(&mut self) -> &mut T
[src]impl<T>From<T> for T
[src]impl<T, U>Into<U> for Twhere
U:From<T>,
[src]impl<I>IntoIterator for Iwhere
I:Iterator,
[src]typeItem = <I asIterator>::Item
The type of the elements being iterated over.
typeIntoIter = I
Which kind of iterator are we turning this into?
pub fninto_iter(self) -> I
[src]impl<T, U>TryFrom<U> for Twhere
U:Into<T>,
[src]typeError =Infallible
The type returned in the event of a conversion error.
pub fntry_from(value: U) ->Result<T, <T asTryFrom<U>>::Error>
[src]impl<T, U>TryInto<U> for Twhere
U:TryFrom<T>,
[src]