Enum spinoso_regexp::Encoding[][src]

pub enum Encoding {
    Fixed,
    No,
    None,
}

The encoding of a Regexp literal.

Regexps are assumed to use the source encoding but literals may override the encoding with a Regexp modifier.

See `Regexp encoding.

Variants

Fixed
No
None

Implementations

impl Encoding[src]

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

Construct a new None encoding.

#[must_use]pub const fn flags(self) -> Flags[src]

Convert an Encoding to its bit flag representation.

Alias for the corresponding Into<Flags> implementation.

#[must_use]pub const fn into_bits(self) -> u8[src]

Convert an Encoding to its bit representation.

Alias for the corresponding Into<u8> implementation.

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

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

See also Regexp#inspect.

Trait Implementations

impl Clone for Encoding[src]

impl Copy for Encoding[src]

impl Debug for Encoding[src]

impl Default for Encoding[src]

impl Display for Encoding[src]

impl Eq for Encoding[src]

impl From<&'_ Encoding> for Flags[src]

fn from(encoding: &Encoding) -> Self[src]

Convert an Encoding to its bit flag representation.

impl From<Encoding> for Flags[src]

fn from(encoding: Encoding) -> Self[src]

Convert an Encoding to its bit flag representation.

impl Hash for Encoding[src]

impl Ord for Encoding[src]

impl PartialEq<Encoding> for Encoding[src]

impl PartialOrd<Encoding> for Encoding[src]

impl TryFrom<&'_ [u8]> for Encoding[src]

type Error = InvalidEncodingError

The type returned in the event of a conversion error.

impl TryFrom<&'_ str> for Encoding[src]

type Error = InvalidEncodingError

The type returned in the event of a conversion error.

impl TryFrom<Flags> for Encoding[src]

type Error = InvalidEncodingError

The type returned in the event of a conversion error.

impl TryFrom<String> for Encoding[src]

type Error = InvalidEncodingError

The type returned in the event of a conversion error.

impl TryFrom<Vec<u8, Global>> for Encoding[src]

type Error = InvalidEncodingError

The type returned in the event of a conversion error.

impl TryFrom<i64> for Encoding[src]

type Error = InvalidEncodingError

The type returned in the event of a conversion error.

impl TryFrom<u8> for Encoding[src]

type Error = InvalidEncodingError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Encoding

impl Send for Encoding

impl Sync for Encoding

impl Unpin for Encoding

impl UnwindSafe for Encoding

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.