Skip to main content

SplitPattern

Trait SplitPattern 

Source
pub trait SplitPattern<'a>: SplitSealed {
    type Iter: Iterator<Item = &'a str>;
}
Expand description

A compatibility pattern whose iterator type exposes its capabilities.

Unlike the legacy v2 erased iterator, this associated type cannot promise reverse iteration for string patterns and therefore cannot panic from an unsupported next_back() call.

Required Associated Types§

Source

type Iter: Iterator<Item = &'a str>

Iterator produced for this pattern.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, 'p> SplitPattern<'a> for &'p str

Source§

type Iter = SplitStr<'a, 'p>

Source§

impl<'a> SplitPattern<'a> for char

Source§

type Iter = Split<'a, char>

Implementors§