Enum Utf8Pattern

enum Utf8Pattern<'a>

Result of calling [Pattern::as_utf8_pattern()]. Can be used for inspecting the contents of a Pattern in cases where the underlying representation can be represented as UTF-8.

Variants

StringPattern(&'a [u8])

Type returned by String and str types.

CharPattern(char)

Type returned by char types.

Implementations

impl<'a> Clone for Utf8Pattern<'a>

fn clone(self: &Self) -> Utf8Pattern<'a>

impl<'a> Copy for Utf8Pattern<'a>

impl<'a> Debug for Utf8Pattern<'a>

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

impl<'a> Eq for Utf8Pattern<'a>

impl<'a> Freeze for Utf8Pattern<'a>

impl<'a> PartialEq for Utf8Pattern<'a>

fn eq(self: &Self, other: &Utf8Pattern<'a>) -> bool

impl<'a> RefUnwindSafe for Utf8Pattern<'a>

impl<'a> Send for Utf8Pattern<'a>

impl<'a> StructuralPartialEq for Utf8Pattern<'a>

impl<'a> Sync for Utf8Pattern<'a>

impl<'a> Unpin for Utf8Pattern<'a>

impl<'a> UnwindSafe for Utf8Pattern<'a>

impl<T> Any for Utf8Pattern<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Utf8Pattern<'a>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Utf8Pattern<'a>

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

impl<T> CloneToUninit for Utf8Pattern<'a>

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

impl<T> From for Utf8Pattern<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for Utf8Pattern<'a>

fn into(self: 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 for Utf8Pattern<'a>

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

impl<T, U> TryInto for Utf8Pattern<'a>

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