Struct regex::bytes::NoExpand
pub struct NoExpand<'t>(pub &'t [u8]);Documentation
NoExpand indicates literal byte string replacement.
It can be used with replace and replace_all to do a literal byte string
replacement without expanding $name to their corresponding capture
groups. This can be both convenient (to avoid escaping $, for example)
and performant (since capture groups don’t need to be found).
't is the lifetime of the literal text.
Fields
pub 0: &'t [u8]Trait Implementations
impl<'t> Debug for NoExpand<'t>
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Resultimpl<'t> Replacer for NoExpand<'t>
fn replace_append(
&mut Self,
_: &Captures<'_>,
dst: &mut Vec<u8>
)fn no_expansion(&mut Self) -> Option<Cow<'_, [u8]>>Auto Trait Implementations
impl<'t> RefUnwindSafe for NoExpand<'t>impl<'t> UnwindSafe for NoExpand<'t>Blanket Implementations
impl<T> BorrowMut<T> for T
where
T: ?Sized,
where
T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T