pub struct ReplacerRef<'a, R: ?Sized>(/* private fields */);
Expand description
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§
Source§impl<'a, R: Replacer + ?Sized + 'a> Replacer for ReplacerRef<'a, R>
impl<'a, R: Replacer + ?Sized + 'a> Replacer for ReplacerRef<'a, R>
Source§fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>)
fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>)
Appends possibly empty data to
dst
to replace the current match. Read moreSource§fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, [u8]>>
fn no_expansion<'r>(&'r mut self) -> Option<Cow<'r, [u8]>>
Return a fixed unchanging replacement byte string. Read more
Source§fn by_ref<'r>(&'r mut self) -> ReplacerRef<'r, Self>
fn by_ref<'r>(&'r mut self) -> ReplacerRef<'r, Self>
Auto Trait Implementations§
impl<'a, R> Freeze for ReplacerRef<'a, R>where
R: ?Sized,
impl<'a, R> RefUnwindSafe for ReplacerRef<'a, R>where
R: RefUnwindSafe + ?Sized,
impl<'a, R> Send for ReplacerRef<'a, R>
impl<'a, R> Sync for ReplacerRef<'a, R>
impl<'a, R> Unpin for ReplacerRef<'a, R>where
R: ?Sized,
impl<'a, R> !UnwindSafe for ReplacerRef<'a, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.