pub struct FileUpload { /* private fields */ }Implementations§
Source§impl FileUpload
impl FileUpload
pub fn new<F: AsyncFileReader + 'static>( file: F, file_name: String, bucket_id: String, optional_info: Option<HashMap<String, String>>, file_size: u64, options: FileUploadOptions, client: Arc<B2SimpleClient>, ) -> Arc<Self>
pub fn id(&self) -> u64
pub fn stats(&self) -> &FileNetworkStats
pub fn status(&self) -> FileStatus
Sourcepub fn has_stopped(&self) -> bool
pub fn has_stopped(&self) -> bool
Returns true when the file has finished or has been aborted.
Sourcepub async fn start(&self) -> Result<B2File, FileUploadError>
pub async fn start(&self) -> Result<B2File, FileUploadError>
Whether it was started or not, will only start if status is Pending
pub async fn add_finish_callback(&self, callback: B2Callback<()>)
Auto Trait Implementations§
impl Freeze for FileUpload
impl !RefUnwindSafe for FileUpload
impl Send for FileUpload
impl Sync for FileUpload
impl Unpin for FileUpload
impl !UnwindSafe for FileUpload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more