Struct IntoChars
#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct IntoChars { pub(in ::string) bytes: IntoIter<u8> }
An iterator over the chars of a string.
This struct is created by the into_chars method on String.
See its documentation for more.
Fields
bytes: IntoIter<u8>
Implementations
impl IntoChars
fn as_str(&self) -> &strViews the underlying data as a subslice of the original data.
Examples
let mut chars = Stringfrom.into_chars; assert_eq!; chars.next; assert_eq!; chars.next; chars.next; assert_eq!;fn into_string(self) -> StringConsumes the
IntoChars, returning the remaining string.Examples
let chars = Stringfrom.into_chars; assert_eq!; let mut chars = Stringfrom.into_chars; chars.next; assert_eq!;fn iter(&self) -> CharIndices<'_>
Trait Implementations
impl Clone for IntoChars
fn clone(&self) -> IntoChars
impl Debug for IntoChars
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl DoubleEndedIterator for IntoChars
fn next_back(&mut self) -> Option<char>
impl FusedIterator for IntoChars
impl Iterator for IntoChars
type Item = char;fn next(&mut self) -> Option<char>fn count(self) -> usizefn size_hint(&self) -> (usize, Option<usize>)fn last(self) -> Option<char>
Auto Trait Implementations
impl Freeze for IntoChars
impl RefUnwindSafe for IntoChars
impl Send for IntoChars
impl Sync for IntoChars
impl Unpin for IntoChars
impl UnsafeUnpin for IntoChars
impl UnwindSafe for IntoChars
Blanket Implementations
impl<I> IntoIterator for IntoChars
where
I: Iterator,
type Item = <I as Iterator>::Item;type IntoIter = I;fn into_iter(self) -> I
impl<T> Any for IntoChars
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for IntoChars
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for IntoChars
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for IntoChars
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for IntoChars
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for IntoChars
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for IntoChars
impl<T> ToOwned for IntoChars
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for IntoChars
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for IntoChars
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for IntoChars
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>