Struct Split

pub struct Split<'r, 'h> { /* private fields */ }

An iterator over all substrings delimited by a regex match.

'r is the lifetime of the compiled regular expression and 'h is the lifetime of the byte string being split.

This iterator is created by Regex::split.

Time complexity

Note that since an iterator runs potentially many searches on the haystack and since each search has worst case O(m * n) time complexity, the overall worst case time complexity for iteration is O(m * n^2).

Trait Implementations

impl<'r, 'h> Debug for Split<'r, 'h>

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

impl<'r, 'h> FusedIterator for Split<'r, 'h>

impl<'r, 'h> Iterator for Split<'r, 'h>

type Item = &'h [u8];
fn next(&mut self) -> Option<&'h [u8]>

Auto Trait Implementations

impl<'r, 'h> Freeze for Split<'r, 'h>

impl<'r, 'h> RefUnwindSafe for Split<'r, 'h>

impl<'r, 'h> Send for Split<'r, 'h>

impl<'r, 'h> Sync for Split<'r, 'h>

impl<'r, 'h> Unpin for Split<'r, 'h>

impl<'r, 'h> UnsafeUnpin for Split<'r, 'h>

impl<'r, 'h> UnwindSafe for Split<'r, 'h>

Blanket Implementations

impl<I> IntoIterator for Split<'r, 'h> where I: Iterator,

impl<T> Any for Split<'r, 'h> where T: 'static + ?Sized,

impl<T> Borrow<T> for Split<'r, 'h> where T: ?Sized,

impl<T> BorrowMut<T> for Split<'r, 'h> where T: ?Sized,

impl<T> From<T> for Split<'r, 'h>

impl<T, U> Into<U> for Split<'r, 'h> where U: From<T>,

impl<T, U> TryFrom<U> for Split<'r, 'h> where U: Into<T>,

impl<T, U> TryInto<U> for Split<'r, 'h> where U: TryFrom<T>,