idm_rs

Struct idman

Source
pub struct idman { /* private fields */ }

Implementations§

Source§

impl idman

Source

pub fn new() -> Self

Create a new builder.

Source

pub fn set_idm_path(&mut self, idm_path: &Path)

Set the path to the IDMan executable. Give this func a full path, with the .exe at the end. This function is optional, the default IDMan.exe path is the default install location.

Source

pub fn set_mode(&mut self, mode: Mode)

Set the download mode. This function is optional, the default mode is default.

Source

pub fn set_download_file_url(&mut self, url: &str)

Set the url to the file.

Source

pub fn set_download_file_path(&mut self, file_path: &Path)

Set the path where the file will be downloaded. This function is optional, the default download path is handled by IDM.

Source

pub fn set_download_file_name(&mut self, file_name: &str)

Set the file name, don’t forget to add extension at the end. If not set, IDM will detect it automatically. This function is optional, the default file name is handled by IDM.

Source

pub fn run(&mut self) -> Result<(), Box<dyn Error>>

Executes the settings and download the file.

Auto Trait Implementations§

§

impl Freeze for idman

§

impl RefUnwindSafe for idman

§

impl Send for idman

§

impl Sync for idman

§

impl Unpin for idman

§

impl UnwindSafe for idman

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.