Skip to main content

DownloadSelfTest

Struct DownloadSelfTest 

Source
pub struct DownloadSelfTest {
    game: String,
    server: String,
    token: Option<String>,
    out: Option<PathBuf>,
    largest: bool,
}
Expand description

--selftest-download <game> [--server URL] [--token T] [--out FILE] [--largest]: downloads that game’s smallest package (or --largest) into a throwaway cache, exercising stream, hash, verify, promote and index without the wizard.

Fields§

§game: String§server: String§token: Option<String>§out: Option<PathBuf>§largest: bool

Implementations§

Source§

impl DownloadSelfTest

Source

pub fn from_args() -> Option<DownloadSelfTest>

Source

pub fn run(&self) -> i32

The process exit code: 0 when the package arrived verified and indexed.

Source

fn pick_package(&self) -> Result<PackageInfo, String>

Source

fn download(&self, package: &PackageInfo) -> (i32, String)

Downloads into a throwaway cache, so a check never disturbs the real one.

Auto Trait Implementations§

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.