Struct ReplacerRef
pub struct ReplacerRef<'a, R: ?Sized>(/* private field */);
A by-reference adaptor for a Replacer.
This permits reusing the same Replacer value in multiple calls to a
replacement routine like Regex::replace_all.
This type is created by Replacer::by_ref.
Trait Implementations
impl<'a, R: Debug + ?Sized> Debug for ReplacerRef<'a, R>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a, R: Replacer + ?Sized + 'a> Replacer for ReplacerRef<'a, R>
fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>)fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, [u8]>>
Auto Trait Implementations
impl<'a, R> !UnwindSafe for ReplacerRef<'a, R>
impl<'a, R> Freeze for ReplacerRef<'a, R>
where
&'a mut R: Freeze,
R: ?Sized,
impl<'a, R> RefUnwindSafe for ReplacerRef<'a, R>
where
&'a mut R: RefUnwindSafe,
R: ?Sized,
impl<'a, R> Send for ReplacerRef<'a, R>
where
&'a mut R: Send,
R: ?Sized,
impl<'a, R> Sync for ReplacerRef<'a, R>
where
&'a mut R: Sync,
R: ?Sized,
impl<'a, R> Unpin for ReplacerRef<'a, R>
where
&'a mut R: Unpin,
R: ?Sized,
impl<'a, R> UnsafeUnpin for ReplacerRef<'a, R>
where
&'a mut R: UnsafeUnpin,
R: ?Sized,
Blanket Implementations
impl<T> Any for ReplacerRef<'a, R>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for ReplacerRef<'a, R>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for ReplacerRef<'a, R>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for ReplacerRef<'a, R>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for ReplacerRef<'a, R>
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 ReplacerRef<'a, R>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for ReplacerRef<'a, R>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>