Skip to main content

browser_protocol/tethering/
mod.rs

1//! The Tethering domain defines methods and events for browser port binding.
2use serde::{Serialize, Deserialize};
3use serde_json::Value as JsonValue;
4
5/// Request browser port binding.
6
7#[derive(Debug, Clone, Serialize, Deserialize, Default)]
8#[serde(rename_all = "camelCase")]
9pub struct BindParams {
10    /// Port number to bind.
11
12    pub port: i64,
13}
14
15impl BindParams { pub const METHOD: &'static str = "Tethering.bind"; }
16
17impl crate::CdpCommand for BindParams {
18    const METHOD: &'static str = "Tethering.bind";
19    type Response = crate::EmptyReturns;
20}
21
22/// Request browser port unbinding.
23
24#[derive(Debug, Clone, Serialize, Deserialize, Default)]
25#[serde(rename_all = "camelCase")]
26pub struct UnbindParams {
27    /// Port number to unbind.
28
29    pub port: i64,
30}
31
32impl UnbindParams { pub const METHOD: &'static str = "Tethering.unbind"; }
33
34impl crate::CdpCommand for UnbindParams {
35    const METHOD: &'static str = "Tethering.unbind";
36    type Response = crate::EmptyReturns;
37}