Struct ruplacer::Replacement [−][src]
pub struct Replacement<'a> { /* fields omitted */ }
Expand description
A replacement contains of fragments, the input string and the output string
Implementations
Print the replacement as two lines (red then green)
use ruplacer::{Query, replace}; let input = "let foo_bar = FooBar::new();"; let query = Query::subvert("foo_bar", "spam_eggs"); let replacement = replace(input, &query).unwrap(); replacement.print_self("foo.rs:3"); // outputs: // foo.rs:3 let foo_bar = FooBar::new() // foo.rs3 let spam_eggs = SpamEggs::new()
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Replacement<'a>
impl<'a> Send for Replacement<'a>
impl<'a> Sync for Replacement<'a>
impl<'a> Unpin for Replacement<'a>
impl<'a> UnwindSafe for Replacement<'a>