pub struct THashMap { /* private fields */ }Implementations§
Source§impl THashMap
impl THashMap
pub fn new() -> Self
Sourcepub fn insert(&mut self, typojson: TyposJsonLine, cli: &Cli)
pub fn insert(&mut self, typojson: TyposJsonLine, cli: &Cli)
Here we populate the HashMap with a line in TyposJsonLine format
read from typo’s output JSON file.
Sourcepub fn read_typos_file(self, cli: &Cli) -> Result<Self, Box<dyn Error>>
pub fn read_typos_file(self, cli: &Cli) -> Result<Self, Box<dyn Error>>
Fills and returns a vector of typos that have type_id equal to “typo”.
§Errors
Will return an error if the serde_json can not Deserialize a Json line
pub fn list_typos(&self, cli: &Cli)
pub fn correct_typos(&self, cli: &Cli)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for THashMap
impl RefUnwindSafe for THashMap
impl Send for THashMap
impl Sync for THashMap
impl Unpin for THashMap
impl UnwindSafe for THashMap
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