[][src]Struct artichoke_backend::extn::core::regexp::opts::Options

pub struct Options {
    pub multiline: RegexpOption,
    pub ignore_case: RegexpOption,
    pub extended: RegexpOption,
    pub literal: bool,
}

Configuration options for Ruby Regexps.

Options can be supplied either as an Integer object to Regexp::new or inline in Regexp literals like /artichoke/i.

Fields

multiline: RegexpOption

Multiline mode.

ignore_case: RegexpOption

Case-insensitive mode.

extended: RegexpOption

Extended mode with insignificant whitespace.

literal: bool

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.

Implementations

impl Options[src]

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

Constructs a new, default Options.

#[must_use]pub const fn with_ignore_case() -> Self[src]

An options instance that has only case insensitive mode enabled.

#[must_use]pub fn bitflags(self) -> Int[src]

Convert an Options to its bitflag representation.

Alias for the corresponding Into<Int> implementation.

#[must_use]pub fn as_display_modifier(self) -> &'static str[src]

Serialize the option flags to a string suitable for a Regexp display or debug implementation.

See also Regexp#inspect.

#[must_use]pub fn as_inline_modifier(self) -> &'static str[src]

Serialize the option flags to a string suitable for including in a raw pattern for configuring an underlying Regexp backend.

Trait Implementations

impl Clone for Options[src]

impl ConvertMut<Value, Options> for Artichoke[src]

impl Copy for Options[src]

impl Debug for Options[src]

impl Default for Options[src]

impl Display for Options[src]

impl Eq for Options[src]

impl<'_> From<&'_ [u8]> for Options[src]

impl From<Option<bool>> for Options[src]

impl From<Options> for RegexOptions[src]

impl From<Options> for Int[src]

fn from(opts: Options) -> Self[src]

Convert an Options to its bitflag representation.

impl From<i64> for Options[src]

impl Hash for Options[src]

impl Ord for Options[src]

impl PartialEq<Options> for Options[src]

impl PartialOrd<Options> for Options[src]

impl StructuralEq for Options[src]

impl StructuralPartialEq for Options[src]

Auto Trait Implementations

impl RefUnwindSafe for Options

impl Send for Options

impl Sync for Options

impl Unpin for Options

impl UnwindSafe for Options

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]