Skip to main content

web_sys/features/
gen_TcpServerSocketEvent.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "Event",
9        extends = "::js_sys::Object",
10        js_name = "TCPServerSocketEvent",
11        typescript_type = "TCPServerSocketEvent"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `TcpServerSocketEvent` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocketEvent)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEvent`*"]
19    pub type TcpServerSocketEvent;
20    #[cfg(feature = "TcpSocket")]
21    #[wasm_bindgen(method, getter, js_class = "TCPServerSocketEvent", js_name = "socket")]
22    #[doc = "Getter for the `socket` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocketEvent/socket)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEvent`, `TcpSocket`*"]
27    pub fn socket(this: &TcpServerSocketEvent) -> TcpSocket;
28    #[wasm_bindgen(catch, constructor, js_class = "TCPServerSocketEvent")]
29    #[doc = "The `new TcpServerSocketEvent(..)` constructor, creating a new instance of `TcpServerSocketEvent`."]
30    #[doc = ""]
31    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocketEvent/TCPServerSocketEvent)"]
32    #[doc = ""]
33    #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEvent`*"]
34    pub fn new(type_: &str) -> Result<TcpServerSocketEvent, JsValue>;
35    #[cfg(feature = "TcpServerSocketEventInit")]
36    #[wasm_bindgen(catch, constructor, js_class = "TCPServerSocketEvent")]
37    #[doc = "The `new TcpServerSocketEvent(..)` constructor, creating a new instance of `TcpServerSocketEvent`."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TCPServerSocketEvent/TCPServerSocketEvent)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEvent`, `TcpServerSocketEventInit`*"]
42    pub fn new_with_event_init_dict(
43        type_: &str,
44        event_init_dict: &TcpServerSocketEventInit,
45    ) -> Result<TcpServerSocketEvent, JsValue>;
46}