pub struct FileUpload { /* private fields */ }Trait Implementations§
Source§impl SendUpload for FileUpload
impl SendUpload for FileUpload
Source§async fn write_chunk(
&mut self,
offset: u64,
reader: &mut (dyn AsyncRead + Unpin + Send),
) -> Result<u64, TusError>
async fn write_chunk( &mut self, offset: u64, reader: &mut (dyn AsyncRead + Unpin + Send), ) -> Result<u64, TusError>
Write chunk data starting at
offset, streaming from reader.
Returns the number of bytes written.Source§async fn get_info(&self) -> Result<UploadInfo, TusError>
async fn get_info(&self) -> Result<UploadInfo, TusError>
Retrieve current metadata and offset.
Source§async fn finalize(&mut self) -> Result<(), TusError>
async fn finalize(&mut self) -> Result<(), TusError>
Called once all bytes have been received (offset == size).
Source§async fn delete(self) -> Result<(), TusError>
async fn delete(self) -> Result<(), TusError>
Delete this upload and free all associated resources.
Called by the termination extension (DELETE). Return
Err if unsupported.Source§async fn declare_length(&mut self, length: u64) -> Result<(), TusError>
async fn declare_length(&mut self, length: u64) -> Result<(), TusError>
Set the definitive
Upload-Length on a deferred-length upload.
Called when the client provides Upload-Length on a PATCH request.Source§async fn read_content(
&self,
) -> Result<Box<dyn AsyncRead + Send + Unpin>, TusError>
async fn read_content( &self, ) -> Result<Box<dyn AsyncRead + Send + Unpin>, TusError>
Stream the completed upload bytes for HTTP GET (download) requests.
Return
TusError::UploadNotReadyForDownload when the upload is incomplete or not readable.Source§async fn concatenate(&mut self, partials: &[UploadInfo]) -> Result<(), TusError>
async fn concatenate(&mut self, partials: &[UploadInfo]) -> Result<(), TusError>
Assemble fully-uploaded partials (in order) into this final upload.
Called by the concatenation extension.
Auto Trait Implementations§
impl Freeze for FileUpload
impl RefUnwindSafe for FileUpload
impl Send for FileUpload
impl Sync for FileUpload
impl Unpin for FileUpload
impl UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<TraitVariantBlanketType> Upload for TraitVariantBlanketTypewhere
TraitVariantBlanketType: SendUpload,
impl<TraitVariantBlanketType> Upload for TraitVariantBlanketTypewhere
TraitVariantBlanketType: SendUpload,
Source§async fn write_chunk(
&mut self,
offset: u64,
reader: &mut (dyn AsyncRead + Send + Unpin),
) -> Result<u64, TusError>
async fn write_chunk( &mut self, offset: u64, reader: &mut (dyn AsyncRead + Send + Unpin), ) -> Result<u64, TusError>
Write chunk data starting at
offset, streaming from reader.
Returns the number of bytes written.Source§async fn get_info(&self) -> Result<UploadInfo, TusError>
async fn get_info(&self) -> Result<UploadInfo, TusError>
Retrieve current metadata and offset.
Source§async fn finalize(&mut self) -> Result<(), TusError>
async fn finalize(&mut self) -> Result<(), TusError>
Called once all bytes have been received (offset == size).
Source§async fn delete(self) -> Result<(), TusError>
async fn delete(self) -> Result<(), TusError>
Delete this upload and free all associated resources.
Called by the termination extension (DELETE). Return
Err if unsupported.Source§async fn declare_length(&mut self, length: u64) -> Result<(), TusError>
async fn declare_length(&mut self, length: u64) -> Result<(), TusError>
Set the definitive
Upload-Length on a deferred-length upload.
Called when the client provides Upload-Length on a PATCH request.Source§async fn concatenate(&mut self, partials: &[UploadInfo]) -> Result<(), TusError>
async fn concatenate(&mut self, partials: &[UploadInfo]) -> Result<(), TusError>
Assemble fully-uploaded partials (in order) into this final upload.
Called by the concatenation extension.
Source§async fn read_content(
&self,
) -> Result<Box<dyn AsyncRead + Send + Unpin>, TusError>
async fn read_content( &self, ) -> Result<Box<dyn AsyncRead + Send + Unpin>, TusError>
Stream the completed upload bytes for HTTP GET (download) requests.
Return
TusError::UploadNotReadyForDownload when the upload is incomplete or not readable.