use serde::{Serialize, Deserialize};
use serde_json::Value as JsonValue;
use std::borrow::Cow;
pub type RequestId<'a> = Cow<'a, str>;
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
pub enum RequestStage {
#[default]
#[serde(rename = "Request")]
Request,
#[serde(rename = "Response")]
Response,
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct RequestPattern<'a> {
#[serde(skip_serializing_if = "Option::is_none", rename = "urlPattern")]
url_pattern: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none", rename = "resourceType")]
resource_type: Option<crate::network::ResourceType>,
#[serde(skip_serializing_if = "Option::is_none", rename = "requestStage")]
request_stage: Option<RequestStage>,
}
impl<'a> RequestPattern<'a> {
pub fn builder() -> RequestPatternBuilder<'a> {
RequestPatternBuilder {
url_pattern: None,
resource_type: None,
request_stage: None,
}
}
pub fn url_pattern(&self) -> Option<&str> { self.url_pattern.as_deref() }
pub fn resource_type(&self) -> Option<&crate::network::ResourceType> { self.resource_type.as_ref() }
pub fn request_stage(&self) -> Option<&RequestStage> { self.request_stage.as_ref() }
}
#[derive(Default)]
pub struct RequestPatternBuilder<'a> {
url_pattern: Option<Cow<'a, str>>,
resource_type: Option<crate::network::ResourceType>,
request_stage: Option<RequestStage>,
}
impl<'a> RequestPatternBuilder<'a> {
pub fn url_pattern(mut self, url_pattern: impl Into<Cow<'a, str>>) -> Self { self.url_pattern = Some(url_pattern.into()); self }
pub fn resource_type(mut self, resource_type: crate::network::ResourceType) -> Self { self.resource_type = Some(resource_type); self }
pub fn request_stage(mut self, request_stage: impl Into<RequestStage>) -> Self { self.request_stage = Some(request_stage.into()); self }
pub fn build(self) -> RequestPattern<'a> {
RequestPattern {
url_pattern: self.url_pattern,
resource_type: self.resource_type,
request_stage: self.request_stage,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct HeaderEntry<'a> {
name: Cow<'a, str>,
value: Cow<'a, str>,
}
impl<'a> HeaderEntry<'a> {
pub fn builder(name: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>) -> HeaderEntryBuilder<'a> {
HeaderEntryBuilder {
name: name.into(),
value: value.into(),
}
}
pub fn name(&self) -> &str { self.name.as_ref() }
pub fn value(&self) -> &str { self.value.as_ref() }
}
pub struct HeaderEntryBuilder<'a> {
name: Cow<'a, str>,
value: Cow<'a, str>,
}
impl<'a> HeaderEntryBuilder<'a> {
pub fn build(self) -> HeaderEntry<'a> {
HeaderEntry {
name: self.name,
value: self.value,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct AuthChallenge<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
source: Option<Cow<'a, str>>,
origin: Cow<'a, str>,
scheme: Cow<'a, str>,
realm: Cow<'a, str>,
}
impl<'a> AuthChallenge<'a> {
pub fn builder(origin: impl Into<Cow<'a, str>>, scheme: impl Into<Cow<'a, str>>, realm: impl Into<Cow<'a, str>>) -> AuthChallengeBuilder<'a> {
AuthChallengeBuilder {
source: None,
origin: origin.into(),
scheme: scheme.into(),
realm: realm.into(),
}
}
pub fn source(&self) -> Option<&str> { self.source.as_deref() }
pub fn origin(&self) -> &str { self.origin.as_ref() }
pub fn scheme(&self) -> &str { self.scheme.as_ref() }
pub fn realm(&self) -> &str { self.realm.as_ref() }
}
pub struct AuthChallengeBuilder<'a> {
source: Option<Cow<'a, str>>,
origin: Cow<'a, str>,
scheme: Cow<'a, str>,
realm: Cow<'a, str>,
}
impl<'a> AuthChallengeBuilder<'a> {
pub fn source(mut self, source: impl Into<Cow<'a, str>>) -> Self { self.source = Some(source.into()); self }
pub fn build(self) -> AuthChallenge<'a> {
AuthChallenge {
source: self.source,
origin: self.origin,
scheme: self.scheme,
realm: self.realm,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct AuthChallengeResponse<'a> {
response: Cow<'a, str>,
#[serde(skip_serializing_if = "Option::is_none")]
username: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none")]
password: Option<Cow<'a, str>>,
}
impl<'a> AuthChallengeResponse<'a> {
pub fn builder(response: impl Into<Cow<'a, str>>) -> AuthChallengeResponseBuilder<'a> {
AuthChallengeResponseBuilder {
response: response.into(),
username: None,
password: None,
}
}
pub fn response(&self) -> &str { self.response.as_ref() }
pub fn username(&self) -> Option<&str> { self.username.as_deref() }
pub fn password(&self) -> Option<&str> { self.password.as_deref() }
}
pub struct AuthChallengeResponseBuilder<'a> {
response: Cow<'a, str>,
username: Option<Cow<'a, str>>,
password: Option<Cow<'a, str>>,
}
impl<'a> AuthChallengeResponseBuilder<'a> {
pub fn username(mut self, username: impl Into<Cow<'a, str>>) -> Self { self.username = Some(username.into()); self }
pub fn password(mut self, password: impl Into<Cow<'a, str>>) -> Self { self.password = Some(password.into()); self }
pub fn build(self) -> AuthChallengeResponse<'a> {
AuthChallengeResponse {
response: self.response,
username: self.username,
password: self.password,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct DisableParams {}
impl DisableParams { pub const METHOD: &'static str = "Fetch.disable"; }
impl<'a> crate::CdpCommand<'a> for DisableParams {
const METHOD: &'static str = "Fetch.disable";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct EnableParams<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
patterns: Option<Vec<RequestPattern<'a>>>,
#[serde(skip_serializing_if = "Option::is_none", rename = "handleAuthRequests")]
handle_auth_requests: Option<bool>,
}
impl<'a> EnableParams<'a> {
pub fn builder() -> EnableParamsBuilder<'a> {
EnableParamsBuilder {
patterns: None,
handle_auth_requests: None,
}
}
pub fn patterns(&self) -> Option<&[RequestPattern<'a>]> { self.patterns.as_deref() }
pub fn handle_auth_requests(&self) -> Option<bool> { self.handle_auth_requests }
}
#[derive(Default)]
pub struct EnableParamsBuilder<'a> {
patterns: Option<Vec<RequestPattern<'a>>>,
handle_auth_requests: Option<bool>,
}
impl<'a> EnableParamsBuilder<'a> {
pub fn patterns(mut self, patterns: Vec<RequestPattern<'a>>) -> Self { self.patterns = Some(patterns); self }
pub fn handle_auth_requests(mut self, handle_auth_requests: bool) -> Self { self.handle_auth_requests = Some(handle_auth_requests); self }
pub fn build(self) -> EnableParams<'a> {
EnableParams {
patterns: self.patterns,
handle_auth_requests: self.handle_auth_requests,
}
}
}
impl<'a> EnableParams<'a> { pub const METHOD: &'static str = "Fetch.enable"; }
impl<'a> crate::CdpCommand<'a> for EnableParams<'a> {
const METHOD: &'static str = "Fetch.enable";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct FailRequestParams<'a> {
#[serde(rename = "requestId")]
request_id: RequestId<'a>,
#[serde(rename = "errorReason")]
error_reason: crate::network::ErrorReason,
}
impl<'a> FailRequestParams<'a> {
pub fn builder(request_id: impl Into<RequestId<'a>>, error_reason: crate::network::ErrorReason) -> FailRequestParamsBuilder<'a> {
FailRequestParamsBuilder {
request_id: request_id.into(),
error_reason: error_reason,
}
}
pub fn request_id(&self) -> &RequestId<'a> { &self.request_id }
pub fn error_reason(&self) -> &crate::network::ErrorReason { &self.error_reason }
}
pub struct FailRequestParamsBuilder<'a> {
request_id: RequestId<'a>,
error_reason: crate::network::ErrorReason,
}
impl<'a> FailRequestParamsBuilder<'a> {
pub fn build(self) -> FailRequestParams<'a> {
FailRequestParams {
request_id: self.request_id,
error_reason: self.error_reason,
}
}
}
impl<'a> FailRequestParams<'a> { pub const METHOD: &'static str = "Fetch.failRequest"; }
impl<'a> crate::CdpCommand<'a> for FailRequestParams<'a> {
const METHOD: &'static str = "Fetch.failRequest";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct FulfillRequestParams<'a> {
#[serde(rename = "requestId")]
request_id: RequestId<'a>,
#[serde(rename = "responseCode")]
response_code: i64,
#[serde(skip_serializing_if = "Option::is_none", rename = "responseHeaders")]
response_headers: Option<Vec<HeaderEntry<'a>>>,
#[serde(skip_serializing_if = "Option::is_none", rename = "binaryResponseHeaders")]
binary_response_headers: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none")]
body: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none", rename = "responsePhrase")]
response_phrase: Option<Cow<'a, str>>,
}
impl<'a> FulfillRequestParams<'a> {
pub fn builder(request_id: impl Into<RequestId<'a>>, response_code: i64) -> FulfillRequestParamsBuilder<'a> {
FulfillRequestParamsBuilder {
request_id: request_id.into(),
response_code: response_code,
response_headers: None,
binary_response_headers: None,
body: None,
response_phrase: None,
}
}
pub fn request_id(&self) -> &RequestId<'a> { &self.request_id }
pub fn response_code(&self) -> i64 { self.response_code }
pub fn response_headers(&self) -> Option<&[HeaderEntry<'a>]> { self.response_headers.as_deref() }
pub fn binary_response_headers(&self) -> Option<&str> { self.binary_response_headers.as_deref() }
pub fn body(&self) -> Option<&str> { self.body.as_deref() }
pub fn response_phrase(&self) -> Option<&str> { self.response_phrase.as_deref() }
}
pub struct FulfillRequestParamsBuilder<'a> {
request_id: RequestId<'a>,
response_code: i64,
response_headers: Option<Vec<HeaderEntry<'a>>>,
binary_response_headers: Option<Cow<'a, str>>,
body: Option<Cow<'a, str>>,
response_phrase: Option<Cow<'a, str>>,
}
impl<'a> FulfillRequestParamsBuilder<'a> {
pub fn response_headers(mut self, response_headers: Vec<HeaderEntry<'a>>) -> Self { self.response_headers = Some(response_headers); self }
pub fn binary_response_headers(mut self, binary_response_headers: impl Into<Cow<'a, str>>) -> Self { self.binary_response_headers = Some(binary_response_headers.into()); self }
pub fn body(mut self, body: impl Into<Cow<'a, str>>) -> Self { self.body = Some(body.into()); self }
pub fn response_phrase(mut self, response_phrase: impl Into<Cow<'a, str>>) -> Self { self.response_phrase = Some(response_phrase.into()); self }
pub fn build(self) -> FulfillRequestParams<'a> {
FulfillRequestParams {
request_id: self.request_id,
response_code: self.response_code,
response_headers: self.response_headers,
binary_response_headers: self.binary_response_headers,
body: self.body,
response_phrase: self.response_phrase,
}
}
}
impl<'a> FulfillRequestParams<'a> { pub const METHOD: &'static str = "Fetch.fulfillRequest"; }
impl<'a> crate::CdpCommand<'a> for FulfillRequestParams<'a> {
const METHOD: &'static str = "Fetch.fulfillRequest";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ContinueRequestParams<'a> {
#[serde(rename = "requestId")]
request_id: RequestId<'a>,
#[serde(skip_serializing_if = "Option::is_none")]
url: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none")]
method: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none", rename = "postData")]
post_data: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none")]
headers: Option<Vec<HeaderEntry<'a>>>,
#[serde(skip_serializing_if = "Option::is_none", rename = "interceptResponse")]
intercept_response: Option<bool>,
}
impl<'a> ContinueRequestParams<'a> {
pub fn builder(request_id: impl Into<RequestId<'a>>) -> ContinueRequestParamsBuilder<'a> {
ContinueRequestParamsBuilder {
request_id: request_id.into(),
url: None,
method: None,
post_data: None,
headers: None,
intercept_response: None,
}
}
pub fn request_id(&self) -> &RequestId<'a> { &self.request_id }
pub fn url(&self) -> Option<&str> { self.url.as_deref() }
pub fn method(&self) -> Option<&str> { self.method.as_deref() }
pub fn post_data(&self) -> Option<&str> { self.post_data.as_deref() }
pub fn headers(&self) -> Option<&[HeaderEntry<'a>]> { self.headers.as_deref() }
pub fn intercept_response(&self) -> Option<bool> { self.intercept_response }
}
pub struct ContinueRequestParamsBuilder<'a> {
request_id: RequestId<'a>,
url: Option<Cow<'a, str>>,
method: Option<Cow<'a, str>>,
post_data: Option<Cow<'a, str>>,
headers: Option<Vec<HeaderEntry<'a>>>,
intercept_response: Option<bool>,
}
impl<'a> ContinueRequestParamsBuilder<'a> {
pub fn url(mut self, url: impl Into<Cow<'a, str>>) -> Self { self.url = Some(url.into()); self }
pub fn method(mut self, method: impl Into<Cow<'a, str>>) -> Self { self.method = Some(method.into()); self }
pub fn post_data(mut self, post_data: impl Into<Cow<'a, str>>) -> Self { self.post_data = Some(post_data.into()); self }
pub fn headers(mut self, headers: Vec<HeaderEntry<'a>>) -> Self { self.headers = Some(headers); self }
pub fn intercept_response(mut self, intercept_response: bool) -> Self { self.intercept_response = Some(intercept_response); self }
pub fn build(self) -> ContinueRequestParams<'a> {
ContinueRequestParams {
request_id: self.request_id,
url: self.url,
method: self.method,
post_data: self.post_data,
headers: self.headers,
intercept_response: self.intercept_response,
}
}
}
impl<'a> ContinueRequestParams<'a> { pub const METHOD: &'static str = "Fetch.continueRequest"; }
impl<'a> crate::CdpCommand<'a> for ContinueRequestParams<'a> {
const METHOD: &'static str = "Fetch.continueRequest";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ContinueWithAuthParams<'a> {
#[serde(rename = "requestId")]
request_id: RequestId<'a>,
#[serde(rename = "authChallengeResponse")]
auth_challenge_response: AuthChallengeResponse<'a>,
}
impl<'a> ContinueWithAuthParams<'a> {
pub fn builder(request_id: impl Into<RequestId<'a>>, auth_challenge_response: AuthChallengeResponse<'a>) -> ContinueWithAuthParamsBuilder<'a> {
ContinueWithAuthParamsBuilder {
request_id: request_id.into(),
auth_challenge_response: auth_challenge_response,
}
}
pub fn request_id(&self) -> &RequestId<'a> { &self.request_id }
pub fn auth_challenge_response(&self) -> &AuthChallengeResponse<'a> { &self.auth_challenge_response }
}
pub struct ContinueWithAuthParamsBuilder<'a> {
request_id: RequestId<'a>,
auth_challenge_response: AuthChallengeResponse<'a>,
}
impl<'a> ContinueWithAuthParamsBuilder<'a> {
pub fn build(self) -> ContinueWithAuthParams<'a> {
ContinueWithAuthParams {
request_id: self.request_id,
auth_challenge_response: self.auth_challenge_response,
}
}
}
impl<'a> ContinueWithAuthParams<'a> { pub const METHOD: &'static str = "Fetch.continueWithAuth"; }
impl<'a> crate::CdpCommand<'a> for ContinueWithAuthParams<'a> {
const METHOD: &'static str = "Fetch.continueWithAuth";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct ContinueResponseParams<'a> {
#[serde(rename = "requestId")]
request_id: RequestId<'a>,
#[serde(skip_serializing_if = "Option::is_none", rename = "responseCode")]
response_code: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none", rename = "responsePhrase")]
response_phrase: Option<Cow<'a, str>>,
#[serde(skip_serializing_if = "Option::is_none", rename = "responseHeaders")]
response_headers: Option<Vec<HeaderEntry<'a>>>,
#[serde(skip_serializing_if = "Option::is_none", rename = "binaryResponseHeaders")]
binary_response_headers: Option<Cow<'a, str>>,
}
impl<'a> ContinueResponseParams<'a> {
pub fn builder(request_id: impl Into<RequestId<'a>>) -> ContinueResponseParamsBuilder<'a> {
ContinueResponseParamsBuilder {
request_id: request_id.into(),
response_code: None,
response_phrase: None,
response_headers: None,
binary_response_headers: None,
}
}
pub fn request_id(&self) -> &RequestId<'a> { &self.request_id }
pub fn response_code(&self) -> Option<i64> { self.response_code }
pub fn response_phrase(&self) -> Option<&str> { self.response_phrase.as_deref() }
pub fn response_headers(&self) -> Option<&[HeaderEntry<'a>]> { self.response_headers.as_deref() }
pub fn binary_response_headers(&self) -> Option<&str> { self.binary_response_headers.as_deref() }
}
pub struct ContinueResponseParamsBuilder<'a> {
request_id: RequestId<'a>,
response_code: Option<i64>,
response_phrase: Option<Cow<'a, str>>,
response_headers: Option<Vec<HeaderEntry<'a>>>,
binary_response_headers: Option<Cow<'a, str>>,
}
impl<'a> ContinueResponseParamsBuilder<'a> {
pub fn response_code(mut self, response_code: i64) -> Self { self.response_code = Some(response_code); self }
pub fn response_phrase(mut self, response_phrase: impl Into<Cow<'a, str>>) -> Self { self.response_phrase = Some(response_phrase.into()); self }
pub fn response_headers(mut self, response_headers: Vec<HeaderEntry<'a>>) -> Self { self.response_headers = Some(response_headers); self }
pub fn binary_response_headers(mut self, binary_response_headers: impl Into<Cow<'a, str>>) -> Self { self.binary_response_headers = Some(binary_response_headers.into()); self }
pub fn build(self) -> ContinueResponseParams<'a> {
ContinueResponseParams {
request_id: self.request_id,
response_code: self.response_code,
response_phrase: self.response_phrase,
response_headers: self.response_headers,
binary_response_headers: self.binary_response_headers,
}
}
}
impl<'a> ContinueResponseParams<'a> { pub const METHOD: &'static str = "Fetch.continueResponse"; }
impl<'a> crate::CdpCommand<'a> for ContinueResponseParams<'a> {
const METHOD: &'static str = "Fetch.continueResponse";
type Response = crate::EmptyReturns;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct GetResponseBodyParams<'a> {
#[serde(rename = "requestId")]
request_id: RequestId<'a>,
}
impl<'a> GetResponseBodyParams<'a> {
pub fn builder(request_id: impl Into<RequestId<'a>>) -> GetResponseBodyParamsBuilder<'a> {
GetResponseBodyParamsBuilder {
request_id: request_id.into(),
}
}
pub fn request_id(&self) -> &RequestId<'a> { &self.request_id }
}
pub struct GetResponseBodyParamsBuilder<'a> {
request_id: RequestId<'a>,
}
impl<'a> GetResponseBodyParamsBuilder<'a> {
pub fn build(self) -> GetResponseBodyParams<'a> {
GetResponseBodyParams {
request_id: self.request_id,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct GetResponseBodyReturns<'a> {
body: Cow<'a, str>,
#[serde(rename = "base64Encoded")]
base64_encoded: bool,
}
impl<'a> GetResponseBodyReturns<'a> {
pub fn builder(body: impl Into<Cow<'a, str>>, base64_encoded: bool) -> GetResponseBodyReturnsBuilder<'a> {
GetResponseBodyReturnsBuilder {
body: body.into(),
base64_encoded: base64_encoded,
}
}
pub fn body(&self) -> &str { self.body.as_ref() }
pub fn base64_encoded(&self) -> bool { self.base64_encoded }
}
pub struct GetResponseBodyReturnsBuilder<'a> {
body: Cow<'a, str>,
base64_encoded: bool,
}
impl<'a> GetResponseBodyReturnsBuilder<'a> {
pub fn build(self) -> GetResponseBodyReturns<'a> {
GetResponseBodyReturns {
body: self.body,
base64_encoded: self.base64_encoded,
}
}
}
impl<'a> GetResponseBodyParams<'a> { pub const METHOD: &'static str = "Fetch.getResponseBody"; }
impl<'a> crate::CdpCommand<'a> for GetResponseBodyParams<'a> {
const METHOD: &'static str = "Fetch.getResponseBody";
type Response = GetResponseBodyReturns<'a>;
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct TakeResponseBodyAsStreamParams<'a> {
#[serde(rename = "requestId")]
request_id: RequestId<'a>,
}
impl<'a> TakeResponseBodyAsStreamParams<'a> {
pub fn builder(request_id: impl Into<RequestId<'a>>) -> TakeResponseBodyAsStreamParamsBuilder<'a> {
TakeResponseBodyAsStreamParamsBuilder {
request_id: request_id.into(),
}
}
pub fn request_id(&self) -> &RequestId<'a> { &self.request_id }
}
pub struct TakeResponseBodyAsStreamParamsBuilder<'a> {
request_id: RequestId<'a>,
}
impl<'a> TakeResponseBodyAsStreamParamsBuilder<'a> {
pub fn build(self) -> TakeResponseBodyAsStreamParams<'a> {
TakeResponseBodyAsStreamParams {
request_id: self.request_id,
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct TakeResponseBodyAsStreamReturns<'a> {
stream: crate::io::StreamHandle<'a>,
}
impl<'a> TakeResponseBodyAsStreamReturns<'a> {
pub fn builder(stream: crate::io::StreamHandle<'a>) -> TakeResponseBodyAsStreamReturnsBuilder<'a> {
TakeResponseBodyAsStreamReturnsBuilder {
stream: stream,
}
}
pub fn stream(&self) -> &crate::io::StreamHandle<'a> { &self.stream }
}
pub struct TakeResponseBodyAsStreamReturnsBuilder<'a> {
stream: crate::io::StreamHandle<'a>,
}
impl<'a> TakeResponseBodyAsStreamReturnsBuilder<'a> {
pub fn build(self) -> TakeResponseBodyAsStreamReturns<'a> {
TakeResponseBodyAsStreamReturns {
stream: self.stream,
}
}
}
impl<'a> TakeResponseBodyAsStreamParams<'a> { pub const METHOD: &'static str = "Fetch.takeResponseBodyAsStream"; }
impl<'a> crate::CdpCommand<'a> for TakeResponseBodyAsStreamParams<'a> {
const METHOD: &'static str = "Fetch.takeResponseBodyAsStream";
type Response = TakeResponseBodyAsStreamReturns<'a>;
}