pub struct FetchResult {Show 24 fields
pub request_id: RequestId,
pub request_url: String,
pub final_url: String,
pub status: u16,
pub page_kind: Option<PageKind>,
pub next_action: Option<NextAction>,
pub tab_id: Option<TabId>,
pub trace: Trace,
pub warnings: Vec<Warning>,
pub body_file: Option<PathBuf>,
pub rendered_html_file: Option<PathBuf>,
pub text_file: Option<PathBuf>,
pub content_file: Option<PathBuf>,
pub content_json_file: Option<PathBuf>,
pub screenshot_file: Option<PathBuf>,
pub network_file: Option<PathBuf>,
pub console_file: Option<PathBuf>,
pub observation_file: Option<PathBuf>,
pub storage_file: Option<PathBuf>,
pub download_file: Option<PathBuf>,
pub download_bytes: Option<u64>,
pub download_filename: Option<String>,
pub download_url: Option<String>,
pub download_state: Option<String>,
}Expand description
Result of a successful fetch. Serialized verbatim into the response
envelope; the protocol writer adds the outer code: "fetch" tag.
Fields§
§request_id: RequestId§request_url: String§final_url: String§status: u16§page_kind: Option<PageKind>§next_action: Option<NextAction>§tab_id: Option<TabId>§trace: Trace§warnings: Vec<Warning>§body_file: Option<PathBuf>§rendered_html_file: Option<PathBuf>§text_file: Option<PathBuf>§content_file: Option<PathBuf>§content_json_file: Option<PathBuf>§screenshot_file: Option<PathBuf>§network_file: Option<PathBuf>§console_file: Option<PathBuf>§observation_file: Option<PathBuf>§storage_file: Option<PathBuf>§download_file: Option<PathBuf>§download_bytes: Option<u64>§download_filename: Option<String>§download_url: Option<String>§download_state: Option<String>Implementations§
Source§impl FetchResult
impl FetchResult
Sourcepub fn set_artifact_file(&mut self, artifact: Artifact, path: PathBuf)
pub fn set_artifact_file(&mut self, artifact: Artifact, path: PathBuf)
Convenience for setting an artifact path in its top-level *_file
field. The JSON contract intentionally does not nest these paths.
Sourcepub fn attach_takeover(&mut self, takeover_url: String)
pub fn attach_takeover(&mut self, takeover_url: String)
Enrich a detected wall’s next_action for afhttp fetch --takeover:
attach the human takeover URL and recommend re-fetching the same
persistent tab once the human clears the wall. No-op when no wall was
detected (no next_action).
Sourcepub fn attach_takeover_with_context(
&mut self,
takeover_url: String,
expires_at_rfc3339: Option<String>,
ttl_s: Option<u64>,
scope: Option<String>,
endpoint: Option<&str>,
profile: Option<&str>,
)
pub fn attach_takeover_with_context( &mut self, takeover_url: String, expires_at_rfc3339: Option<String>, ttl_s: Option<u64>, scope: Option<String>, endpoint: Option<&str>, profile: Option<&str>, )
Like Self::attach_takeover, but also makes the recommended command
self-contained for non-default hosts and explicitly shared profiles.
pub fn artifact_file(&self, artifact: Artifact) -> Option<&PathBuf>
Trait Implementations§
Source§impl Clone for FetchResult
impl Clone for FetchResult
Source§fn clone(&self) -> FetchResult
fn clone(&self) -> FetchResult
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 moreSource§impl Debug for FetchResult
impl Debug for FetchResult
Source§impl<'de> Deserialize<'de> for FetchResult
impl<'de> Deserialize<'de> for FetchResult
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 Freeze for FetchResult
impl RefUnwindSafe for FetchResult
impl Send for FetchResult
impl Sync for FetchResult
impl Unpin for FetchResult
impl UnsafeUnpin for FetchResult
impl UnwindSafe for FetchResult
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