Struct spinoso_regexp::Source[][src]

pub struct Source { /* fields omitted */ }


impl Source[src]

pub const fn new() -> Self[src]

Construct a new, empty Source.

pub const fn with_pattern_and_options(
    pattern: Vec<u8>,
    options: Options
) -> Self

Construct a new Source with the given pattern and Options.

pub const fn is_casefold(&self) -> bool[src]

Whether this source was parsed with ignore case enabled.

pub const fn is_literal(&self) -> bool[src]

Whether the Regexp was parsed as a literal, e.g. '/artichoke/i.

This enables Ruby parsers to inject whether a Regexp is a literal to the core library. Literal Regexps have some special behavior regrding capturing groups and report parse failures differently.

pub fn pattern(&self) -> &[u8][src]

Extracts a slice containing the entire pattern.

pub const fn options(&self) -> Options[src]

Return a copy of the underlying Options.

Trait Implementations

impl Clone for Source[src]

impl Debug for Source[src]

impl Default for Source[src]

impl Eq for Source[src]

impl From<&'_ Config> for Source[src]

impl From<&'_ Source> for Config[src]

impl From<Config> for Source[src]

impl From<Source> for Config[src]

impl Hash for Source[src]

impl Ord for Source[src]

impl PartialEq<Source> for Source[src]

impl PartialOrd<Source> for Source[src]

impl StructuralEq for Source[src]

impl StructuralPartialEq for Source[src]

Auto Trait Implementations

impl RefUnwindSafe for Source

impl Send for Source

impl Sync for Source

impl Unpin for Source

impl UnwindSafe for Source

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.