Struct backblaze_b2::raw::upload::UploadAuthorization
[−]
[src]
pub struct UploadAuthorization { pub bucket_id: String, pub upload_url: String, pub authorization_token: String, }
The b2 website specifies that you may not upload to the same url in parallel. Therefore this type is not Sync
Fields
bucket_id: String
upload_url: String
Methods
impl UploadAuthorization
[src]
fn auth_header(&self) -> B2AuthHeader
impl UploadAuthorization
[src]
fn upload_file<InfoType, R: Read, C, S>(
&self,
file: &mut R,
file_name: String,
content_type: Option<Mime>,
content_length: u64,
content_sha1: String,
connector: &C
) -> Result<MoreFileInfo<InfoType>, B2Error> where
InfoType: Deserialize<'de>,
R: Sized,
C: NetworkConnector<Stream = S>,
S: Into<Box<NetworkStream + Send>>,
&self,
file: &mut R,
file_name: String,
content_type: Option<Mime>,
content_length: u64,
content_sha1: String,
connector: &C
) -> Result<MoreFileInfo<InfoType>, B2Error> where
InfoType: Deserialize<'de>,
R: Sized,
C: NetworkConnector<Stream = S>,
S: Into<Box<NetworkStream + Send>>,
Some arguments are String, since the hyper headers require Strings
fn create_upload_file_request<C, S>(
&self,
file_name: String,
content_type: Option<Mime>,
content_length: u64,
content_sha1: String,
connector: &C
) -> Result<UploadFileRequest, B2Error> where
C: NetworkConnector<Stream = S>,
S: Into<Box<NetworkStream + Send>>,
&self,
file_name: String,
content_type: Option<Mime>,
content_length: u64,
content_sha1: String,
connector: &C
) -> Result<UploadFileRequest, B2Error> where
C: NetworkConnector<Stream = S>,
S: Into<Box<NetworkStream + Send>>,
Trait Implementations
impl Clone for UploadAuthorization
[src]
fn clone(&self) -> UploadAuthorization
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more