Struct gotham::router::tree::regex::ConstrainedSegmentRegex[][src]

pub struct ConstrainedSegmentRegex { /* fields omitted */ }

A unwind-safe wrapper for Regex that implements PartialEq, Eq, PartialOrd, and Ord. These traits are implemented in a potentially error-prone way by comparing the underlying &str representations of the regular expression.

If the ConstrainedSegmentRegex::is_match traps a panic from Regex::is_match, std::process::abort() will be called and the program will terminate.

Implementations

impl ConstrainedSegmentRegex[src]

pub fn new(regex: &str) -> Self[src]

Creates a new ConstrainedSegmentRegex from a provided string.

It wraps the string in begin and end of line anchors to prevent it from matching more than intended.

Trait Implementations

impl Clone for ConstrainedSegmentRegex[src]

impl Eq for ConstrainedSegmentRegex[src]

impl Ord for ConstrainedSegmentRegex[src]

impl PartialEq<ConstrainedSegmentRegex> for ConstrainedSegmentRegex[src]

impl PartialOrd<ConstrainedSegmentRegex> for ConstrainedSegmentRegex[src]

Auto Trait Implementations

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument 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, 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>,