Struct UWordBoundIndices

struct UWordBoundIndices<'a> { ... }

External iterator for word boundaries and byte offsets.

This struct is created by the split_word_bound_indices method on the UnicodeSegmentation trait. See its documentation for more.

Implementations

impl<'a> UWordBoundIndices<'a>

fn as_str(self: &Self) -> &'a str

View the underlying data (the part yet to be iterated) as a slice of the original string.

# use unicode_segmentation::UnicodeSegmentation;
let mut iter = "Hello world".split_word_bound_indices();
assert_eq!(iter.as_str(), "Hello world");
iter.next();
assert_eq!(iter.as_str(), " world");
iter.next();
assert_eq!(iter.as_str(), "world");

impl<'a> Clone for UWordBoundIndices<'a>

fn clone(self: &Self) -> UWordBoundIndices<'a>

impl<'a> Debug for UWordBoundIndices<'a>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl<'a> DoubleEndedIterator for UWordBoundIndices<'a>

fn next_back(self: &mut Self) -> Option<(usize, &'a str)>

impl<'a> Freeze for UWordBoundIndices<'a>

impl<'a> Iterator for UWordBoundIndices<'a>

fn next(self: &mut Self) -> Option<(usize, &'a str)>
fn size_hint(self: &Self) -> (usize, Option<usize>)

impl<'a> RefUnwindSafe for UWordBoundIndices<'a>

impl<'a> Send for UWordBoundIndices<'a>

impl<'a> Sync for UWordBoundIndices<'a>

impl<'a> Unpin for UWordBoundIndices<'a>

impl<'a> UnsafeUnpin for UWordBoundIndices<'a>

impl<'a> UnwindSafe for UWordBoundIndices<'a>

impl<I> IntoIterator for UWordBoundIndices<'a>

fn into_iter(self: Self) -> I

impl<T> Any for UWordBoundIndices<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for UWordBoundIndices<'a>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for UWordBoundIndices<'a>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for UWordBoundIndices<'a>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for UWordBoundIndices<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for UWordBoundIndices<'a>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for UWordBoundIndices<'a>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for UWordBoundIndices<'a>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>