pub struct ResourceFile {
pub path: String,
pub url: Url,
pub size: Option<u64>,
pub checksum: Option<Checksum>,
pub headers: Vec<Header>,
pub metadata: BTreeMap<String, String>,
pub use_response_filename: bool,
}Expand description
One file belonging to a Resource.
Fields§
§path: StringRelative output path. Always validated and safe to join under the task destination.
url: UrlResolved URL the backend fetches.
size: Option<u64>Expected size in bytes, when the protocol or a previous probe reported it.
checksum: Option<Checksum>Expected checksum for this file, when known.
headers: Vec<Header>Additional headers applied only to this file’s requests.
metadata: BTreeMap<String, String>Protocol-private key/value data preserved in the sidecar.
use_response_filename: boolDirect links prefer the server’s Content-Disposition filename; Hub
snapshots use the repository-relative path.
Implementations§
Trait Implementations§
Source§impl Clone for ResourceFile
impl Clone for ResourceFile
Source§impl Debug for ResourceFile
impl Debug for ResourceFile
Source§impl<'de> Deserialize<'de> for ResourceFile
impl<'de> Deserialize<'de> for ResourceFile
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 Forget for ResourceFile
impl Freeze for ResourceFile
impl Move for ResourceFile
impl RefUnwindSafe for ResourceFile
impl Send for ResourceFile
impl Sync for ResourceFile
impl Unpin for ResourceFile
impl UnsafeUnpin for ResourceFile
impl UnwindSafe for ResourceFile
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