[][src]Struct rec::prelude::Rec

pub struct Rec { /* fields omitted */ }

Constructs a regular expression.

This implements the Builder pattern for Regex.

Methods

impl Rec[src]

pub fn build(self) -> Regex[src]

Builds a Regex from self.

This is only safe to use with Recs that are known prior to runtime. Otherwise use [try_build].

Panics

Panics if self contains an invalid expression.

Trait Implementations

impl Element for Rec[src]

fn alternate(&self, other: &dyn Element) -> Rec[src]

Creates a Rec consisting of the alternation of self and other. Read more

fn concatenate(&self, other: &dyn Element) -> Rec[src]

Creates a Rec consisting of the concatenation of self and other.

fn is_equal(&self, other: &dyn Element) -> bool[src]

Returns if the regular expression of self is equal to that of other.

fn group(&self) -> String[src]

Returns the regular expression of self as a single Atom. Read more

impl<T: Element> PartialEq<T> for Rec[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl PartialEq<Rec> for char[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<'_> PartialEq<Rec> for &'_ str[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl PartialEq<Rec> for String[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<'_> From<&'_ str> for Rec[src]

fn from(other: &str) -> Self[src]

Converts the regular expression in &str format to a Rec.

Note that this conversion does not escape metacharacters; for that functionality use &str as an Element.

impl From<String> for Rec[src]

impl<Rhs: Element> Add<Rhs> for Rec[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<Rec> for char[src]

type Output = Rec

The resulting type after applying the + operator.

impl<'_> Add<Rec> for &'_ str[src]

type Output = Rec

The resulting type after applying the + operator.

impl Add<Rec> for String[src]

type Output = Rec

The resulting type after applying the + operator.

impl BitOr<Rec> for Rec[src]

type Output = Self

The resulting type after applying the | operator.

impl<'_> BitOr<&'_ str> for Rec[src]

type Output = Self

The resulting type after applying the | operator.

impl BitOr<Rec> for char[src]

type Output = Rec

The resulting type after applying the | operator.

impl<'_> BitOr<Rec> for &'_ str[src]

type Output = Rec

The resulting type after applying the | operator.

impl BitOr<Rec> for String[src]

type Output = Rec

The resulting type after applying the | operator.

impl BitOr<Rec> for Class[src]

type Output = Rec

The resulting type after applying the | operator.

impl BitOr<Rec> for Ch[src]

type Output = Rec

The resulting type after applying the | operator.

impl BitOr<Ch> for Rec[src]

type Output = Self

The resulting type after applying the | operator.

impl Debug for Rec[src]

Auto Trait Implementations

impl Sync for Rec

impl Send for Rec

impl Unpin for Rec

impl RefUnwindSafe for Rec

impl UnwindSafe for Rec

Blanket Implementations

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

impl<T> From<T> for T[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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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