Trait Regex

Source
pub trait Regex {
    type Haystack<'h>;
    type CaptureLocations: CaptureLocations;

    // Required methods
    fn capture_locations(&self) -> Self::CaptureLocations;
    fn captures_read(
        &self,
        locs: &mut Self::CaptureLocations,
        haystack: Self::Haystack<'_>,
    ) -> Option<(usize, usize)>;
}

Required Associated Types§

Required Methods§

Source

fn capture_locations(&self) -> Self::CaptureLocations

Source

fn captures_read( &self, locs: &mut Self::CaptureLocations, haystack: Self::Haystack<'_>, ) -> Option<(usize, usize)>

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.

Implementations on Foreign Types§

Source§

impl Regex for Regex

Source§

type Haystack<'h> = &'h [u8]

Source§

type CaptureLocations = CaptureLocations

Source§

fn capture_locations(&self) -> Self::CaptureLocations

Source§

fn captures_read( &self, locs: &mut Self::CaptureLocations, haystack: Self::Haystack<'_>, ) -> Option<(usize, usize)>

Source§

impl Regex for Regex

Source§

type Haystack<'h> = &'h str

Source§

type CaptureLocations = CaptureLocations

Source§

fn capture_locations(&self) -> Self::CaptureLocations

Source§

fn captures_read( &self, locs: &mut Self::CaptureLocations, haystack: Self::Haystack<'_>, ) -> Option<(usize, usize)>

Implementors§