Struct gatherbrained::Gatherbrained
source · pub struct Gatherbrained { /* private fields */ }
Expand description
An active corpus of gatherbrained ideas.
Implementations§
source§impl Gatherbrained
impl Gatherbrained
sourcepub fn new<P: AsRef<Path>>(path: P) -> Result<Self, Error>
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Create a new gatherbrained instance by reading and parsing the provided file.
sourcepub fn edit(&mut self, needles: &[&str]) -> Result<(), Error>
pub fn edit(&mut self, needles: &[&str]) -> Result<(), Error>
Edit all of the gatherbrained entries that match all of the provided needles.
sourcepub fn search(&self, needles: &[&str]) -> Result<String, Error>
pub fn search(&self, needles: &[&str]) -> Result<String, Error>
Search this gatherbrained for entries that match all of the provided needles. Returns a string that represents the selected entries in valid gatherbrained format.
sourcepub fn narrate(&self, narratives: &[&str]) -> Result<String, Error>
pub fn narrate(&self, narratives: &[&str]) -> Result<String, Error>
Narrate the gatherbrained. This will return a string in valid gatherbrained format that corresponds to searching for the needles provided by the narratives. This is shorthand for writing a loop that searches for sets of needles, one after the other.
Auto Trait Implementations§
impl RefUnwindSafe for Gatherbrained
impl Send for Gatherbrained
impl Sync for Gatherbrained
impl Unpin for Gatherbrained
impl UnwindSafe for Gatherbrained
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