pub trait UploadSpecLike {
// Required methods
fn filename(&self) -> &str;
fn source_kind(&self) -> UploadSourceKind;
// Provided methods
fn content_length(&self) -> Option<u64> { ... }
fn content_type(&self) -> Option<&str> { ... }
}Expand description
Shared inspection surface for upload specifications.
Required Methods§
Sourcefn source_kind(&self) -> UploadSourceKind
fn source_kind(&self) -> UploadSourceKind
Returns the kind of source backing this upload.
Provided Methods§
Sourcefn content_length(&self) -> Option<u64>
fn content_length(&self) -> Option<u64>
Returns the exact content length when it is already known cheaply.
Sourcefn content_type(&self) -> Option<&str>
fn content_type(&self) -> Option<&str>
Returns the HTTP content type when the upload tracks one.