Struct molybdenum::file::Data
source · [−]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>,
}
Fields
search_opt: Option<Search>
invert_pattern: bool
replace_opt: Option<Replace>
path: PathBuf
content: Vec<u8>
lines: Vec<Line>
Implementations
sourceimpl 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<()>where
P: AsRef<Path>,
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 RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more