Enum Utf8Pattern
pub 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 str) Type returned by String and str types. This stores
strrather than bytes so callers cannot describe non-UTF-8 string patterns through this API.-
CharPattern(char) Type returned by char types.
Trait Implementations
impl<'a> Clone for Utf8Pattern<'a>
fn clone(&self) -> Utf8Pattern<'a>
impl<'a> Copy for Utf8Pattern<'a>
impl<'a> Debug for Utf8Pattern<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a> Eq for Utf8Pattern<'a>
fn assert_fields_are_eq(&self)
impl<'a> PartialEq for Utf8Pattern<'a>
fn eq(&self, other: &Utf8Pattern<'a>) -> bool
impl<'a> StructuralPartialEq for Utf8Pattern<'a>
impl<'a> TrivialClone for Utf8Pattern<'a>
Auto Trait Implementations
impl<'a> Freeze for Utf8Pattern<'a>
impl<'a> RefUnwindSafe for Utf8Pattern<'a>
impl<'a> Send for Utf8Pattern<'a>
impl<'a> Sync for Utf8Pattern<'a>
impl<'a> Unpin for Utf8Pattern<'a>
impl<'a> UnsafeUnpin for Utf8Pattern<'a>
impl<'a> UnwindSafe for Utf8Pattern<'a>
Blanket Implementations
impl<T> Any for Utf8Pattern<'a>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Utf8Pattern<'a>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Utf8Pattern<'a>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Utf8Pattern<'a>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Utf8Pattern<'a>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Printable for Utf8Pattern<'a>
where
T: Copy + Debug,
impl<T> SizeHint for Utf8Pattern<'a>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Utf8Pattern<'a>
impl<T, U> Into<U> for Utf8Pattern<'a>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Utf8Pattern<'a>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Utf8Pattern<'a>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>