pub struct UploadInfo {
pub id: UploadId,
pub size: Option<u64>,
pub offset: u64,
pub metadata: Metadata,
pub size_is_deferred: bool,
pub expires_at: Option<DateTime<Utc>>,
pub is_partial: bool,
pub is_final: bool,
pub partial_uploads: Vec<UploadId>,
pub storage: HashMap<String, String>,
}Expand description
Complete state of a single upload resource.
Fields§
§id: UploadId§size: Option<u64>Declared total size in bytes. None when Upload-Defer-Length: 1 was used.
offset: u64Bytes successfully written so far.
metadata: Metadata§size_is_deferred: boolTrue when created with Upload-Defer-Length: 1 and size not yet set.
expires_at: Option<DateTime<Utc>>Set by the expiration extension.
is_partial: boolTrue for partial uploads (concatenation extension).
is_final: boolTrue for final assembled uploads (concatenation extension).
partial_uploads: Vec<UploadId>IDs of partial uploads used to build this final upload.
storage: HashMap<String, String>Opaque storage-backend-specific metadata (e.g. file path, S3 key).
Implementations§
Trait Implementations§
Source§impl Clone for UploadInfo
impl Clone for UploadInfo
Source§fn clone(&self) -> UploadInfo
fn clone(&self) -> UploadInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UploadInfo
impl Debug for UploadInfo
Source§impl<'de> Deserialize<'de> for UploadInfo
impl<'de> Deserialize<'de> for UploadInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UploadInfo
impl RefUnwindSafe for UploadInfo
impl Send for UploadInfo
impl Sync for UploadInfo
impl Unpin for UploadInfo
impl UnsafeUnpin for UploadInfo
impl UnwindSafe for UploadInfo
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