Struct backblaze_b2::raw::download::DownloadAuthorization [] [src]

pub struct DownloadAuthorization {
    pub authorization_token: String,
    pub bucket_id: Option<String>,
    pub file_name_prefix: String,
    pub download_url: String,
}

Contains the authorization and access data concerning a download authorization on backblaze.

This struct is usually obtained from a B2Authorization using the methods to_download_authorization and get_download_authorization.

Fields

Methods

impl DownloadAuthorization
[src]

Returns a hyper header that can be added to download requests on the backblaze api.

Tests whether this download authorization allows access to the given bucket

impl DownloadAuthorization
[src]

Performs a b2_download_file_by_id api call.

Errors

This function returns a B2Error in case something goes wrong. Besides the standard errors, this function can fail with is_file_not_found.

Performs a b2_download_file_by_id api call. This function specifies the range of the file to download, and the range_max parameter is inclusive.

Errors

This function returns a B2Error in case something goes wrong. Besides the standard errors, this function can fail with is_file_not_found and is_range_out_of_bounds.

Performs a b2_download_file_by_name api call.

Errors

This function returns a B2Error in case something goes wrong. Besides the standard errors, this function can fail with is_file_not_found and is_bucket_not_found.

Performs a b2_download_file_by_name api call. This function specifies the range of the file to download, and the range_max parameter is inclusive.

Errors

This function returns a B2Error in case something goes wrong. Besides the standard errors, this function can fail with is_file_not_found, is_range_out_of_bounds and is_bucket_not_found.

Trait Implementations

impl Clone for DownloadAuthorization
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for DownloadAuthorization
[src]

Formats the value using the given formatter.