Struct backblaze_b2::raw::upload::UploadFileRequestSha1End
[−]
[src]
pub struct UploadFileRequestSha1End { /* fields omitted */ }
Contains an ongoing upload to the backblaze b2 api. This struct is created by the create_upload_file_request_sha1_at_end method.
Methods
impl UploadFileRequestSha1End
[src]
fn finish<InfoType>(self, sha1: &str) -> Result<MoreFileInfo<InfoType>, B2Error> where
InfoType: Deserialize<'de>,
InfoType: Deserialize<'de>,
Finishes the upload of the file and returns information about the uploaded file. The sha1
argument must be the ascii encoding of the sha1 of the file.
The sha1 should be 40 bytes long, but this is not checked at runtime. If it is not 40 bytes the b2 server will complain with some kind of bad request error.
Errors
This function returns a B2Error
in case something goes wrong. Besides the standard
errors, this function can fail with is_cap_exceeded
, is_invalid_sha1
.
Trait Implementations
impl Write for UploadFileRequestSha1End
[src]
fn write(&mut self, msg: &[u8]) -> Result<usize>
Write a buffer into this object, returning how many bytes were written. Read more
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this write. Read more
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
Writes a formatted string into this writer, returning any error encountered. Read more
fn by_ref(&mut self) -> &mut Self
1.0.0
Creates a "by reference" adaptor for this instance of Write
. Read more