Crate backblaze_b2 [] [src]

The backblaze api requires https, so you need to provide a Client with a https connector.

Such a client can be created with the api call below:

extern crate hyper;
extern crate hyper_native_tls;
use hyper::Client;
use hyper::net::HttpsConnector;
use hyper_native_tls::NativeTlsClient;

let ssl = NativeTlsClient::new().unwrap();
let connector = HttpsConnector::new(ssl);
let client = Client::with_connector(connector);

Unfortunately because of the hyper api design, the upload functionality in this library requires the connector instead of the client, and since the client consumes the connector, you'll have to make two of them.

See the raw module documentation for more information on using this crate.

Currently this library is used through the raw module. This module simply supplies a function for each api call. Another module for easier usage is planned.

Modules

raw

This module contains five different modules, each with different functions for accessing the b2 api directly.

Structs

B2AuthHeader
B2ErrorMessage

The b2 api returns errors in a json-object, that can be deserialized into this struct.

Enums

B2Error

An error caused while using any of the B2 apis. Errors returned by the b2 api are stored exactly as received from backblaze and for ease of use several methods are provided on this type in order to check the kind of error.