[][src]Enum modio::download::DownloadAction

pub enum DownloadAction {
    Primary {
        game_id: u32,
        mod_id: u32,
    },
    File {
        game_id: u32,
        mod_id: u32,
        file_id: u32,
    },
    FileObj(Box<File>),
    Version {
        game_id: u32,
        mod_id: u32,
        version: String,
        policy: ResolvePolicy,
    },
}

Defines the action that is performed for Modio::download.

Variants

Primary

Download the primary modfile of a mod.

Fields of Primary

game_id: u32mod_id: u32
File

Download a specific modfile of a mod.

Fields of File

game_id: u32mod_id: u32file_id: u32
FileObj(Box<File>)

Download a specific modfile.

Version

Download a specific version of a mod.

Fields of Version

game_id: u32mod_id: u32version: Stringpolicy: ResolvePolicy

Trait Implementations

impl Debug for DownloadAction[src]

impl<'a> From<(u32, u32, &'a str)> for DownloadAction[src]

Convert (u32, u32, &'a str) to DownloadAction::Version with resolve policy set to ResolvePolicy::Latest

impl From<(u32, u32, String)> for DownloadAction[src]

Convert (u32, u32, String) to DownloadAction::Version with resolve policy set to ResolvePolicy::Latest

impl From<(u32, u32, u32)> for DownloadAction[src]

Convert (u32, u32, u32) to DownloadAction::File

impl From<(u32, u32)> for DownloadAction[src]

Convert (u32, u32) to DownloadAction::Primary

impl From<File> for DownloadAction[src]

Convert File to DownloadAction::FileObj

impl From<Mod> for DownloadAction[src]

Convert Mod to DownloadAction::File or DownloadAction::Primary if Mod::modfile is None

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.