pub struct App<'a, O: Write, E: Write> { /* private fields */ }
Implementations§
Source§impl<'a, O: Write, E: Write> App<'a, O, E>
impl<'a, O: Write, E: Write> App<'a, O, E>
pub fn new<R: Read>( etc_hosts: &'a str, db: Option<R>, stdout: &'a mut O, stderr: &'a mut E, ) -> Result<Self>
pub fn get_sources(&self) -> &HashMap<Cow<'a, str>, [u8; 32]>
pub fn add_allow<T: Iterator<Item = &'a str>>(&mut self, args: T)
pub fn rm_allow<T: Iterator<Item = &'a str>>(&mut self, args: T)
pub fn add_block<T: Iterator<Item = &'a str>>(&mut self, args: T)
pub fn rm_block<T: Iterator<Item = &'a str>>(&mut self, args: T)
pub fn add_redirect<T: Iterator<Item = (&'a str, &'a str)>>(&mut self, args: T)
pub fn rm_redirect<T: Iterator<Item = &'a str>>(&mut self, args: T)
pub fn add_sources<T: Iterator<Item = &'a str>>(&mut self, args: T)
pub fn rm_sources<T: Iterator<Item = &'a str>>(&mut self, args: T)
pub fn get_update(&mut self) -> Vec<(String, String, [u8; 32])>
pub fn print_etc_hosts(&mut self) -> Result<()>
pub fn get_update_fource(&mut self) -> Vec<(String, String, [u8; 32])>
pub fn apply_update(&mut self, update: &'a [(String, String, [u8; 32])])
pub fn clear_host(&mut self)
pub fn export<W: Write>(&mut self, w: &mut W) -> Result<()>
pub fn save_1<W1: Write, W2: Write>( &mut self, w1: &mut W1, w2: &mut W2, ) -> Result<()>
pub fn save<W1: Write, W2: Write, F: FnOnce() -> (W1, W2)>( &mut self, f: F, ) -> Result<()>
pub fn restore_etc_hosts<W: Write>(etc_hosts: &str, w: &mut W) -> Result<()>
pub fn clear_data(&mut self)
pub fn restore_data<W: Write>(w: &mut W) -> Result<()>
Auto Trait Implementations§
impl<'a, O, E> Freeze for App<'a, O, E>
impl<'a, O, E> RefUnwindSafe for App<'a, O, E>where
O: RefUnwindSafe,
E: RefUnwindSafe,
impl<'a, O, E> Send for App<'a, O, E>
impl<'a, O, E> Sync for App<'a, O, E>
impl<'a, O, E> Unpin for App<'a, O, E>
impl<'a, O, E> !UnwindSafe for App<'a, O, E>
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