web_sys/features/
gen_XPathResult.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = XPathResult , typescript_type = "XPathResult")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `XPathResult` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
14    pub type XPathResult;
15    # [wasm_bindgen (structural , method , getter , js_class = "XPathResult" , js_name = resultType)]
16    #[doc = "Getter for the `resultType` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/resultType)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
21    pub fn result_type(this: &XPathResult) -> u16;
22    # [wasm_bindgen (structural , catch , method , getter , js_class = "XPathResult" , js_name = numberValue)]
23    #[doc = "Getter for the `numberValue` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/numberValue)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
28    pub fn number_value(this: &XPathResult) -> Result<f64, JsValue>;
29    # [wasm_bindgen (structural , catch , method , getter , js_class = "XPathResult" , js_name = stringValue)]
30    #[doc = "Getter for the `stringValue` field of this object."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/stringValue)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
35    pub fn string_value(this: &XPathResult) -> Result<::alloc::string::String, JsValue>;
36    # [wasm_bindgen (structural , catch , method , getter , js_class = "XPathResult" , js_name = booleanValue)]
37    #[doc = "Getter for the `booleanValue` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/booleanValue)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
42    pub fn boolean_value(this: &XPathResult) -> Result<bool, JsValue>;
43    #[cfg(feature = "Node")]
44    # [wasm_bindgen (structural , catch , method , getter , js_class = "XPathResult" , js_name = singleNodeValue)]
45    #[doc = "Getter for the `singleNodeValue` field of this object."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/singleNodeValue)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `Node`, `XPathResult`*"]
50    pub fn single_node_value(this: &XPathResult) -> Result<Option<Node>, JsValue>;
51    # [wasm_bindgen (structural , method , getter , js_class = "XPathResult" , js_name = invalidIteratorState)]
52    #[doc = "Getter for the `invalidIteratorState` field of this object."]
53    #[doc = ""]
54    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/invalidIteratorState)"]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
57    pub fn invalid_iterator_state(this: &XPathResult) -> bool;
58    # [wasm_bindgen (structural , catch , method , getter , js_class = "XPathResult" , js_name = snapshotLength)]
59    #[doc = "Getter for the `snapshotLength` field of this object."]
60    #[doc = ""]
61    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/snapshotLength)"]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
64    pub fn snapshot_length(this: &XPathResult) -> Result<u32, JsValue>;
65    #[cfg(feature = "Node")]
66    # [wasm_bindgen (catch , method , structural , js_class = "XPathResult" , js_name = iterateNext)]
67    #[doc = "The `iterateNext()` method."]
68    #[doc = ""]
69    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/iterateNext)"]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `Node`, `XPathResult`*"]
72    pub fn iterate_next(this: &XPathResult) -> Result<Option<Node>, JsValue>;
73    #[cfg(feature = "Node")]
74    # [wasm_bindgen (catch , method , structural , js_class = "XPathResult" , js_name = snapshotItem)]
75    #[doc = "The `snapshotItem()` method."]
76    #[doc = ""]
77    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XPathResult/snapshotItem)"]
78    #[doc = ""]
79    #[doc = "*This API requires the following crate features to be activated: `Node`, `XPathResult`*"]
80    pub fn snapshot_item(this: &XPathResult, index: u32) -> Result<Option<Node>, JsValue>;
81}
82impl XPathResult {
83    #[doc = "The `XPathResult.ANY_TYPE` const."]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
86    pub const ANY_TYPE: u16 = 0i64 as u16;
87    #[doc = "The `XPathResult.NUMBER_TYPE` const."]
88    #[doc = ""]
89    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
90    pub const NUMBER_TYPE: u16 = 1u64 as u16;
91    #[doc = "The `XPathResult.STRING_TYPE` const."]
92    #[doc = ""]
93    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
94    pub const STRING_TYPE: u16 = 2u64 as u16;
95    #[doc = "The `XPathResult.BOOLEAN_TYPE` const."]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
98    pub const BOOLEAN_TYPE: u16 = 3u64 as u16;
99    #[doc = "The `XPathResult.UNORDERED_NODE_ITERATOR_TYPE` const."]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
102    pub const UNORDERED_NODE_ITERATOR_TYPE: u16 = 4u64 as u16;
103    #[doc = "The `XPathResult.ORDERED_NODE_ITERATOR_TYPE` const."]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
106    pub const ORDERED_NODE_ITERATOR_TYPE: u16 = 5u64 as u16;
107    #[doc = "The `XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE` const."]
108    #[doc = ""]
109    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
110    pub const UNORDERED_NODE_SNAPSHOT_TYPE: u16 = 6u64 as u16;
111    #[doc = "The `XPathResult.ORDERED_NODE_SNAPSHOT_TYPE` const."]
112    #[doc = ""]
113    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
114    pub const ORDERED_NODE_SNAPSHOT_TYPE: u16 = 7u64 as u16;
115    #[doc = "The `XPathResult.ANY_UNORDERED_NODE_TYPE` const."]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
118    pub const ANY_UNORDERED_NODE_TYPE: u16 = 8u64 as u16;
119    #[doc = "The `XPathResult.FIRST_ORDERED_NODE_TYPE` const."]
120    #[doc = ""]
121    #[doc = "*This API requires the following crate features to be activated: `XPathResult`*"]
122    pub const FIRST_ORDERED_NODE_TYPE: u16 = 9u64 as u16;
123}