[][src]Struct rapture::download::Downloader

pub struct Downloader {}

This is an empty struct similar to PathManager, but exclusive to downloading

Methods

impl Downloader[src]

This impl handles the downloading of various files. Right now we only support downloading scripts from the web, but in the future I want to expand this to repositories and such.

pub fn download_script(url: String) -> Result<Script, String>[src]

This function takes a url to a rapture script, and calls download_file with the url and the proper download file output location. After downloading, we read the script from the output file and return it.

See script::Script for more information on how the script object works.

pub fn download_file(url: String, output_file: String) -> Result<(), String>[src]

This function handles the actual legwork of downloading a file from the internet. It takes the url to the file on the internet and the path to the resulting output file. To download a file you must have curl installed and in your path! In the future, this wont depend on curl.

Auto Trait Implementations

impl Send for Downloader

impl Sync for Downloader

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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