pub struct PresignedUploadPart {
pub part_number: u64,
pub offset: u64,
pub size: u64,
pub method: Method,
pub url: String,
pub provider_part_id: Option<String>,
pub expires_at_unix_secs: Option<u64>,
pub headers: HeaderMap,
}Expand description
A single presigned upload part.
Fields§
§part_number: u64Provider-defined part number, usually 1-based for OSS/S3 or 0-based for local scheduling.
offset: u64Start offset in the full file.
size: u64Expected byte size of this part.
method: MethodHTTP method, usually PUT.
url: StringFull presigned URL for this part.
provider_part_id: Option<String>Optional provider-specific part identifier, for example Azure block id.
expires_at_unix_secs: Option<u64>Optional URL expiration timestamp in Unix seconds.
headers: HeaderMapHeaders that must be sent exactly as they were signed.
Implementations§
Source§impl PresignedUploadPart
impl PresignedUploadPart
Sourcepub fn put(
part_number: u64,
offset: u64,
size: u64,
url: impl Into<String>,
) -> Self
pub fn put( part_number: u64, offset: u64, size: u64, url: impl Into<String>, ) -> Self
Creates a PUT part with empty headers.
Sourcepub fn with_provider_part_id(self, id: impl Into<String>) -> Self
pub fn with_provider_part_id(self, id: impl Into<String>) -> Self
Sets provider-specific part identifier, for example Azure block id.
Sourcepub fn with_expires_at_unix_secs(self, expires_at_unix_secs: u64) -> Self
pub fn with_expires_at_unix_secs(self, expires_at_unix_secs: u64) -> Self
Sets URL expiration timestamp in Unix seconds.
Sourcepub fn with_headers(self, headers: HeaderMap) -> Self
pub fn with_headers(self, headers: HeaderMap) -> Self
Replaces part headers.
Trait Implementations§
Source§impl Clone for PresignedUploadPart
impl Clone for PresignedUploadPart
Source§fn clone(&self) -> PresignedUploadPart
fn clone(&self) -> PresignedUploadPart
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PresignedUploadPart
impl RefUnwindSafe for PresignedUploadPart
impl Send for PresignedUploadPart
impl Sync for PresignedUploadPart
impl Unpin for PresignedUploadPart
impl UnsafeUnpin for PresignedUploadPart
impl UnwindSafe for PresignedUploadPart
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