Enum ExtractKind

#[non_exhaustive]
pub enum ExtractKind

The kind of literals to extract from an Hir expression.

The default extraction kind is Prefix.

Variants

Prefix

Extracts only prefix literals from a regex.

Suffix

Extracts only suffix literals from a regex.

Note that the sequence returned by suffix literals currently may not correctly represent leftmost-first or "preference" order match semantics.

Implementations

impl ExtractKind

fn is_prefix(&self) -> bool

Returns true if this kind is the Prefix variant.

fn is_suffix(&self) -> bool

Returns true if this kind is the Suffix variant.

Trait Implementations

impl Clone for ExtractKind

fn clone(&self) -> Self

impl Debug for ExtractKind

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

impl Default for ExtractKind

fn default() -> ExtractKind

Auto Trait Implementations

impl Freeze for ExtractKind

impl RefUnwindSafe for ExtractKind

impl Send for ExtractKind

impl Sync for ExtractKind

impl Unpin for ExtractKind

impl UnsafeUnpin for ExtractKind

impl UnwindSafe for ExtractKind

Blanket Implementations

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

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for ExtractKind where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for ExtractKind where T: ?Sized,

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

impl<T> CloneToUninit for ExtractKind where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for ExtractKind

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for ExtractKind where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for ExtractKind where U: From<T>,

fn into(self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom<U> for ExtractKind where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for ExtractKind where U: TryFrom<T>,

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