pub enum Driver {
Chrome,
Gecko,
}Variants§
Implementations§
Source§impl Driver
impl Driver
Sourcepub fn install(&self) -> Result<PathBuf>
pub fn install(&self) -> Result<PathBuf>
Downloads and unarchives the driver executable to $HOME/.webdrivers
§Example
use webdriver_install::Driver;
// Install geckodriver
Driver::Gecko.install()?;
// Install chromedriver
Driver::Chrome.install()?;Sourcepub fn install_into(&self, target_dir: PathBuf) -> Result<PathBuf>
pub fn install_into(&self, target_dir: PathBuf) -> Result<PathBuf>
Downloads and unarchives the driver executable into the specified target_dir
§Example
use webdriver_install::Driver;
use std::path::PathBuf;
// Install geckodriver into /tmp/webdrivers
Driver::Gecko.install_into(PathBuf::from("/tmp/webdrivers"))?;
// Install chromedriver into /tmp/webdrivers
Driver::Chrome.install_into(PathBuf::from("/tmp/webdrivers"))?;Auto Trait Implementations§
impl Freeze for Driver
impl RefUnwindSafe for Driver
impl Send for Driver
impl Sync for Driver
impl Unpin for Driver
impl UnwindSafe for Driver
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