pub struct ArtifactPaths {
pub root: PathBuf,
}Expand description
Concrete on-disk locations for a single fetch. Built from --out (or
the default system temp afhttp-out/) plus the request id.
Fields§
§root: PathBufImplementations§
Source§impl ArtifactPaths
impl ArtifactPaths
Sourcepub fn new(base: impl Into<PathBuf>, request_id: &RequestId) -> Self
pub fn new(base: impl Into<PathBuf>, request_id: &RequestId) -> Self
Compose <base>/<request_id>/. Does not create the directory; the
fetch writer creates it just before producing the first file so a
fetch that fails before any artifact is captured leaves no
half-empty dirs behind.
Sourcepub fn file_for(&self, artifact: Artifact) -> PathBuf
pub fn file_for(&self, artifact: Artifact) -> PathBuf
Path for a given artifact. Body returns body with no extension;
callers append the content-type-derived suffix.
Sourcepub fn network_bodies_dir(&self) -> PathBuf
pub fn network_bodies_dir(&self) -> PathBuf
<root>/network-bodies/<request_id>.<ext> per §8. The CDP
request_id (not the fetch request id) is what’s interpolated by
callers; this helper just hands back the directory.
Trait Implementations§
Source§impl Clone for ArtifactPaths
impl Clone for ArtifactPaths
Source§fn clone(&self) -> ArtifactPaths
fn clone(&self) -> ArtifactPaths
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 ArtifactPaths
impl RefUnwindSafe for ArtifactPaths
impl Send for ArtifactPaths
impl Sync for ArtifactPaths
impl Unpin for ArtifactPaths
impl UnsafeUnpin for ArtifactPaths
impl UnwindSafe for ArtifactPaths
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