pub struct UrlInfo {
pub size: u64,
pub raw_name: String,
pub supports_range: bool,
pub fast_download: bool,
pub final_url: Url,
pub file_id: FileId,
pub content_type: Option<String>,
}Expand description
Metadata about a downloadable resource, gathered from the initial HTTP request.
Includes file size, filename, content type, range support, and file identity
(ETag / Last-Modified) for incremental downloads.
Fields§
§size: u64Total size of the resource in bytes, taken from the Content-Length header (0 if absent).
raw_name: StringRaw filename returned by the server. Sanitize invalid characters before using it safely.
Use the UrlInfo::filename() method to sanitize the filename
supports_range: boolWhether the server supports HTTP range requests (used to split the download into concurrent chunks).
fast_download: boolWhether the resource can be downloaded with the optimized fast (multi-chunk) path.
final_url: UrlThe URL the response was actually served from, after any redirects.
file_id: FileIdStable identity of the file, used to validate incremental/resumable downloads.
content_type: Option<String>The Content-Type header value, if the server provided one.