pub struct SedReplacement { /* private fields */ }Expand description
Helper struct to name mocks based on sed style regex replacement.
Implementations§
Source§impl SedReplacement
impl SedReplacement
Sourcepub fn from_sed_replacement(sed_replacement: &str) -> Result<Self>
pub fn from_sed_replacement(sed_replacement: &str) -> Result<Self>
Creates a SedReplacementNamer from a sed style replacement string, e.g.,
s/Ifc(.*)/Mock\1/, to replace the prefix “Ifc” in class names with “Mock”.
The regex pattern must match the entire class name.
Auto Trait Implementations§
impl Freeze for SedReplacement
impl RefUnwindSafe for SedReplacement
impl Send for SedReplacement
impl Sync for SedReplacement
impl Unpin for SedReplacement
impl UnsafeUnpin for SedReplacement
impl UnwindSafe for SedReplacement
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