Struct tre_regex::RegcompFlags

source ·
pub struct RegcompFlags(_);
Expand description

Flags to pass to regcomp.

Implementations§

source§

impl RegcompFlags

source

pub const NONE: RegFlags = 0i32

Sentinel for empty flags

source

pub const BASIC: RegFlags = 0i32

Basic (obsolete) regex

source

pub const EXTENDED: RegFlags = 1i32

Extended POSIX regex

source

pub const ICASE: RegFlags = 2i32

Case-insensitive matches

source

pub const LITERAL: RegFlags = 16i32

Interpret regex literally (all characters are non-special); aka REG_NOSPEC

source

pub const NOSPEC: RegFlags = 16i32

Same meaning as RegcompFlags::LITERAL

source

pub const NEWLINE: RegFlags = 4i32

Newline-sensitive matching

source

pub const NOSUB: RegFlags = 8i32

Don’t report what was matched; only that it matched.

source

pub const RIGHT_ASSOC: RegFlags = 32i32

Concatenation is right-associative

source

pub const UNGREEDY: RegFlags = 64i32

Repetition operators are non-greedy by default

source

pub const USEBYTES: RegFlags = 128i32

Use raw bytes

source

pub const fn new() -> Self

Construct a new set of empty flags

source

pub const fn add(&self, flag: RegFlags) -> Self

Add a flag

source

pub const fn remove(&self, flag: RegFlags) -> Self

Remove a flag

source

pub const fn get(&self) -> RegFlags

Get set flags as a RegFlags.

Trait Implementations§

source§

impl Clone for RegcompFlags

source§

fn clone(&self) -> RegcompFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RegcompFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for RegcompFlags

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.