pub struct Data {
pub search_opt: Option<Search>,
pub invert_pattern: bool,
pub replace_opt: Option<Replace>,
pub path: PathBuf,
pub content: Vec<u8>,
pub lines: Vec<Line>,
pub filepaths: Vec<PathBuf>,
}Fields§
§search_opt: Option<Search>§invert_pattern: bool§replace_opt: Option<Replace>§path: PathBuf§content: Vec<u8>§lines: Vec<Line>§filepaths: Vec<PathBuf>Implementations§
Source§impl Data
impl Data
pub fn new( search_opt: Option<Search>, invert_pattern: bool, replace_opt: Option<Replace>, ) -> Data
pub fn load<P>(&mut self, path: P) -> Result<()>
pub fn split_in_lines(&mut self) -> Result<()>
pub fn search_for_matches(&mut self) -> bool
pub fn replace_and_write(&self) -> Result<()>
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
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