pub struct ReplaceCommand<'a> { /* private fields */ }
Expand description
A replace command, ready to be applied on your text.
let cmd = ReplaceCommand::new("s/world/世界/i").unwrap();
assert_eq!("Hello, 世界!", cmd.execute("Hello, world!"));
assert_eq!("The 世界 is a cruel place", cmd.execute("The world is a cruel place"));
Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ReplaceCommand<'a>
impl<'a> RefUnwindSafe for ReplaceCommand<'a>
impl<'a> Send for ReplaceCommand<'a>
impl<'a> Sync for ReplaceCommand<'a>
impl<'a> Unpin for ReplaceCommand<'a>
impl<'a> UnwindSafe for ReplaceCommand<'a>
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