1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// @generated by `just generate-methods` from protocol/*.json.
// Do not edit by hand; edit xtask/ and regenerate.
//! The Tethering domain defines methods and events for browser port binding.
//!
//! Types, command parameters and event payloads for the `Tethering`
//! domain. The method-name constants for the same domain are in
//! [`crate::methods`].
//!
//! This domain is experimental and may change without notice.
use serde::{Deserialize, Serialize};
/// Request browser port binding.
///
/// Parameters of `Tethering.bind`.
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct BindParams {
/// Port number to bind.
pub port: i64,
}
impl crate::typed::Command for BindParams {
const METHOD: &'static str = "Tethering.bind";
type Returns = crate::typed::NoReturns;
}
/// Request browser port unbinding.
///
/// Parameters of `Tethering.unbind`.
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct UnbindParams {
/// Port number to unbind.
pub port: i64,
}
impl crate::typed::Command for UnbindParams {
const METHOD: &'static str = "Tethering.unbind";
type Returns = crate::typed::NoReturns;
}
/// Informs that port was successfully bound and got a specified connection
/// id.
///
/// Payload of the `Tethering.accepted` event.
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AcceptedEvent {
/// Port number that was successfully bound.
pub port: i64,
/// Connection id to be used.
#[serde(rename = "connectionId")]
pub connection_id: String,
}
impl crate::typed::Event for AcceptedEvent {
const METHOD: &'static str = "Tethering.accepted";
}