Skip to main content

UploadSpecLike

Trait UploadSpecLike 

Source
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§

Source

fn filename(&self) -> &str

Returns the remote filename that the upload will expose.

Source

fn source_kind(&self) -> UploadSourceKind

Returns the kind of source backing this upload.

Provided Methods§

Source

fn content_length(&self) -> Option<u64>

Returns the exact content length when it is already known cheaply.

Source

fn content_type(&self) -> Option<&str>

Returns the HTTP content type when the upload tracks one.

Implementors§