pub struct EncodeUtf16<'s> { /* private fields */ }Expand description
Represents non-empty iterators over the UTF-16 encoding of non-empty strings.
This struct is created by the encode_utf16 method on NonEmptyStr.
Implementations§
Source§impl<'s> EncodeUtf16<'s>
impl<'s> EncodeUtf16<'s>
Sourcepub const fn new(string: &'s NonEmptyStr) -> Self
pub const fn new(string: &'s NonEmptyStr) -> Self
Constructs Self.
Trait Implementations§
Source§impl<'s> Debug for EncodeUtf16<'s>
impl<'s> Debug for EncodeUtf16<'s>
Source§impl<'s> IntoIterator for EncodeUtf16<'s>
impl<'s> IntoIterator for EncodeUtf16<'s>
Source§impl NonEmptyIterator for EncodeUtf16<'_>
impl NonEmptyIterator for EncodeUtf16<'_>
Source§fn consume(self) -> (Self::Item, Self::IntoIter)
fn consume(self) -> (Self::Item, Self::IntoIter)
Consumes the non-empty iterator, returning the next item
along with the possibly empty iterator.
Source§fn count(self) -> NonZero<usize>
fn count(self) -> NonZero<usize>
Consumes the non-empty iterator, returning the item count. Read more
Source§fn enumerate(self) -> Enumerate<Self>
fn enumerate(self) -> Enumerate<Self>
Creates non-empty iterators that yield the current count and the item during iteration. Read more
Source§fn peeked(self) -> Peeked<Self::IntoIter>
fn peeked(self) -> Peeked<Self::IntoIter>
Peeks at the next item of the non-empty iterator, returning it along
with the possibly empty iterator. Read more
Source§fn chain<I>(self, other: I) -> Chain<Self, <I as IntoIterator>::IntoIter>where
I: IntoIterator<Item = Self::Item>,
fn chain<I>(self, other: I) -> Chain<Self, <I as IntoIterator>::IntoIter>where
I: IntoIterator<Item = Self::Item>,
Links the non-empty iterator with the provided possibly empty iterator. Read more
Source§fn cloned<'a, T>(self) -> Cloned<Self>
fn cloned<'a, T>(self) -> Cloned<Self>
Creates non-empty iterators that clone the items of the underlying non-empty iterator. Read more
Source§fn copied<'a, T>(self) -> Copied<Self>
fn copied<'a, T>(self) -> Copied<Self>
Creates non-empty iterators that copy the items of the underlying non-empty iterator. Read more
Source§fn zip<I>(
self,
other: I,
) -> Zip<Self, <I as IntoNonEmptyIterator>::IntoNonEmptyIter>where
I: IntoNonEmptyIterator,
fn zip<I>(
self,
other: I,
) -> Zip<Self, <I as IntoNonEmptyIterator>::IntoNonEmptyIter>where
I: IntoNonEmptyIterator,
Zips the non-empty iterator with the provided non-empty iterator. Read more
Source§fn all<P>(self, predicate: P) -> bool
fn all<P>(self, predicate: P) -> bool
Tests whether all items of the non-empty iterator match the predicate. Read more
Source§fn any<P>(self, predicate: P) -> bool
fn any<P>(self, predicate: P) -> bool
Tests whether any items of the non-empty iterator match the predicate. Read more
Source§fn none<P>(self, predicate: P) -> bool
fn none<P>(self, predicate: P) -> bool
Tests whether no items of the non-empty iterator match the predicate. Read more
Source§fn reduce<F>(self, function: F) -> Self::Item
fn reduce<F>(self, function: F) -> Self::Item
Reduces the items of the non-empty iterator into the single one
by repeatedly applying the given function. Read more
Source§fn unzip<T, U, C, D>(self) -> (C, D)
fn unzip<T, U, C, D>(self) -> (C, D)
Converts the non-empty iterator of pairs into the pair of collections. Read more
Source§fn collect<C>(self) -> Cwhere
C: FromIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromIterator<Self::Item>,
Source§fn collect_non_empty<C>(self) -> Cwhere
C: FromNonEmptyIterator<Self::Item>,
fn collect_non_empty<C>(self) -> Cwhere
C: FromNonEmptyIterator<Self::Item>,
Collects the items of the non-empty iterator into the collection. Read more
Source§fn flatten(self) -> Flatten<Self>where
Self::Item: IntoNonEmptyIterator,
fn flatten(self) -> Flatten<Self>where
Self::Item: IntoNonEmptyIterator,
Flattens one level of nesting in
self non-empty iterator. Read moreSource§fn filter_map<T, F>(self, function: F) -> FilterMap<Self::IntoIter, F>
fn filter_map<T, F>(self, function: F) -> FilterMap<Self::IntoIter, F>
Source§fn map<U, F>(self, function: F) -> Map<Self, F>
fn map<U, F>(self, function: F) -> Map<Self, F>
Creates non-empty iterators that map the items of the non-empty iterator with the function. Read more
Source§fn max_by<F>(self, function: F) -> Self::Item
fn max_by<F>(self, function: F) -> Self::Item
Returns the maximum item of the non-empty iterator with respect to the comparison function. Read more
Source§fn max_by_key<K, F>(self, function: F) -> Self::Item
fn max_by_key<K, F>(self, function: F) -> Self::Item
Returns the maximum item of the non-empty iterator with respect to the key function. Read more
Source§fn min_by<F>(self, function: F) -> Self::Item
fn min_by<F>(self, function: F) -> Self::Item
Returns the minimum item of the non-empty iterator with respect to the comparison function. Read more
Source§fn min_by_key<K, F>(self, function: F) -> Self::Item
fn min_by_key<K, F>(self, function: F) -> Self::Item
Returns the minimum item of the non-empty iterator with respect to the key function. Read more
Source§fn nth(self, n: NonZero<usize>) -> Option<Self::Item>
fn nth(self, n: NonZero<usize>) -> Option<Self::Item>
Returns the
n-th item of the non-empty iterator. Read moreSource§fn skip(self, count: NonZero<usize>) -> Skip<Self::IntoIter>
fn skip(self, count: NonZero<usize>) -> Skip<Self::IntoIter>
Skips the first given number of items in the non-empty iterator. Read more
Source§fn take(self, count: NonZero<usize>) -> Take<Self>
fn take(self, count: NonZero<usize>) -> Take<Self>
Takes only the first given number of items from the non-empty iterator. Read more
Source§fn step_by(self, step: NonZero<usize>) -> StepBy<Self>
fn step_by(self, step: NonZero<usize>) -> StepBy<Self>
Steps the non-empty iterator by the given custom amount. Read more
Source§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self::IntoIter, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self::IntoIter, P>
Source§fn take_while<P>(self, predicate: P) -> TakeWhile<Self::IntoIter, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self::IntoIter, P>
Source§fn inspect<F>(self, function: F) -> Inspect<Self, F>
fn inspect<F>(self, function: F) -> Inspect<Self, F>
Creates non-empty iterators that call the provided function with references to each item. Read more
Source§fn partial_cmp<I>(self, other: I) -> Option<Ordering>
fn partial_cmp<I>(self, other: I) -> Option<Ordering>
Equivalent to
partial_cmp on Iterator.Source§fn is_sorted_by<F>(self, function: F) -> bool
fn is_sorted_by<F>(self, function: F) -> bool
Equivalent to
is_sorted_by on Iterator.Source§fn is_sorted_by_key<K, F>(self, function: F) -> bool
fn is_sorted_by_key<K, F>(self, function: F) -> bool
Equivalent to
is_sorted_by_key on Iterator.Source§fn collect_into<C>(self, collection: &mut C) -> &mut C
fn collect_into<C>(self, collection: &mut C) -> &mut C
Auto Trait Implementations§
impl<'s> Freeze for EncodeUtf16<'s>
impl<'s> RefUnwindSafe for EncodeUtf16<'s>
impl<'s> Send for EncodeUtf16<'s>
impl<'s> Sync for EncodeUtf16<'s>
impl<'s> Unpin for EncodeUtf16<'s>
impl<'s> UnwindSafe for EncodeUtf16<'s>
Blanket Implementations§
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<I> IntoNonEmptyIterator for Iwhere
I: NonEmptyIterator,
impl<I> IntoNonEmptyIterator for Iwhere
I: NonEmptyIterator,
Source§type IntoNonEmptyIter = I
type IntoNonEmptyIter = I
What kind of
NonEmptyIterator are we turning this into?Source§fn into_non_empty_iter(self) -> <I as IntoNonEmptyIterator>::IntoNonEmptyIter
fn into_non_empty_iter(self) -> <I as IntoNonEmptyIterator>::IntoNonEmptyIter
Converts
self into NonEmptyIterator.Source§impl<I> TryIntoNonEmptyIterator for Iwhere
I: IntoIterator,
impl<I> TryIntoNonEmptyIterator for Iwhere
I: IntoIterator,
Source§type Item = <I as IntoIterator>::Item
type Item = <I as IntoIterator>::Item
The type of the items being iterated over.
Source§type IntoNonEmptyIter = NonEmptyAdapter<Peekable<<I as IntoIterator>::IntoIter>>
type IntoNonEmptyIter = NonEmptyAdapter<Peekable<<I as IntoIterator>::IntoIter>>
Which kind of
NonEmptyIterator are we turning this into?