pub trait Machine<'t>: Sized {
type CaptureIterator: Iterator<Item = Self>;
type FindIterator: Iterator<Item = Match<'t>>;
type SplitIterator: Iterator<Item = &'t str>;
type SplitNIterator: Iterator<Item = &'t str>;
const ORIGINAL_REGEX: &'static str;
// Required methods
fn captures(text: &'t str) -> Option<Self>;
fn captures_iter(text: &'t str) -> Self::CaptureIterator;
fn find(text: &'t str) -> Option<Match<'t>>;
fn find_at(text: &'t str, start: usize) -> Option<Match<'t>>;
fn find_iter(text: &'t str) -> Self::FindIterator;
fn is_match(text: &'t str) -> bool;
fn is_match_at(text: &'t str, start: usize) -> bool;
fn replace(text: &'t str, rep: impl Replacer<'t, Self>) -> Cow<'t, str>;
fn replace_all(text: &'t str, rep: impl Replacer<'t, Self>) -> Cow<'t, str>;
fn replacen(
text: &'t str,
limit: usize,
rep: impl Replacer<'t, Self>,
) -> Cow<'t, str>;
fn split(text: &'t str) -> Self::SplitIterator;
fn splitn(text: &'t str, limit: usize) -> Self::SplitNIterator;
}Required Associated Constants§
const ORIGINAL_REGEX: &'static str
Required Associated Types§
type CaptureIterator: Iterator<Item = Self>
type FindIterator: Iterator<Item = Match<'t>>
type SplitIterator: Iterator<Item = &'t str>
type SplitNIterator: Iterator<Item = &'t str>
Required Methods§
fn captures(text: &'t str) -> Option<Self>
fn captures_iter(text: &'t str) -> Self::CaptureIterator
fn find(text: &'t str) -> Option<Match<'t>>
fn find_at(text: &'t str, start: usize) -> Option<Match<'t>>
fn find_iter(text: &'t str) -> Self::FindIterator
fn is_match(text: &'t str) -> bool
fn is_match_at(text: &'t str, start: usize) -> bool
fn replace(text: &'t str, rep: impl Replacer<'t, Self>) -> Cow<'t, str>
fn replace_all(text: &'t str, rep: impl Replacer<'t, Self>) -> Cow<'t, str>
fn replacen( text: &'t str, limit: usize, rep: impl Replacer<'t, Self>, ) -> Cow<'t, str>
fn split(text: &'t str) -> Self::SplitIterator
fn splitn(text: &'t str, limit: usize) -> Self::SplitNIterator
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.