pub struct Engine { /* private fields */ }Implementations§
Source§impl Engine
impl Engine
pub fn new(parsed: Vec<SedCommand>, options: &Options) -> Result<Self>
Sourcepub fn run(&self, files: &[PathBuf]) -> Result<()>
pub fn run(&self, files: &[PathBuf]) -> Result<()>
Process files (or stdin if empty) and write results to stdout.
Sourcepub fn run_in_place(&self, files: &[PathBuf], backup_suffix: &str) -> Result<()>
pub fn run_in_place(&self, files: &[PathBuf], backup_suffix: &str) -> Result<()>
Process files in-place, optionally creating backups.
Sourcepub fn process_stream<R: BufRead, W: Write>(
&self,
reader: R,
writer: &mut W,
) -> Result<()>
pub fn process_stream<R: BufRead, W: Write>( &self, reader: R, writer: &mut W, ) -> Result<()>
Process input from a buffered reader and write output to a writer.
This is the core sed execution loop. It reads lines (or NUL-delimited
records in -z mode), applies the compiled commands, and writes the
results.
Auto Trait Implementations§
impl Freeze for Engine
impl RefUnwindSafe for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnwindSafe for Engine
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