browser_commander/puppeteer/api/security_details.rs
1// @generated by scripts/generate-puppeteer-bindings.mjs from
2// rust/protocol/puppeteer/api.json. Do not edit by hand.
3
4#![allow(clippy::all, missing_docs, unused_imports, non_snake_case)]
5
6use serde_json::Value;
7
8use super::*;
9use crate::puppeteer::bridge::{binary, remote_type, BridgeError, JsFunction, Remote};
10
11remote_type!(
12 /// Puppeteer's `SecurityDetails` (puppeteer-core 25.12.0), a remote object
13 /// served by `browser-commander serve --stdio`.
14 SecurityDetails
15);
16
17impl SecurityDetails {
18 /// `SecurityDetails.issuer`
19 ///
20 /// ```text
21 /// issuer(): string
22 /// ```
23 pub async fn issuer(&self) -> Result<String, BridgeError> {
24 self.remote.call("issuer", vec![]).await
25 }
26
27 /// `SecurityDetails.validFrom`
28 ///
29 /// ```text
30 /// validFrom(): number
31 /// ```
32 pub async fn valid_from(&self) -> Result<f64, BridgeError> {
33 self.remote.call("validFrom", vec![]).await
34 }
35
36 /// `SecurityDetails.validTo`
37 ///
38 /// ```text
39 /// validTo(): number
40 /// ```
41 pub async fn valid_to(&self) -> Result<f64, BridgeError> {
42 self.remote.call("validTo", vec![]).await
43 }
44
45 /// `SecurityDetails.protocol`
46 ///
47 /// ```text
48 /// protocol(): string
49 /// ```
50 pub async fn protocol(&self) -> Result<String, BridgeError> {
51 self.remote.call("protocol", vec![]).await
52 }
53
54 /// `SecurityDetails.subjectName`
55 ///
56 /// ```text
57 /// subjectName(): string
58 /// ```
59 pub async fn subject_name(&self) -> Result<String, BridgeError> {
60 self.remote.call("subjectName", vec![]).await
61 }
62
63 /// `SecurityDetails.subjectAlternativeNames`
64 ///
65 /// ```text
66 /// subjectAlternativeNames(): string[]
67 /// ```
68 pub async fn subject_alternative_names(&self) -> Result<Vec<String>, BridgeError> {
69 self.remote.call("subjectAlternativeNames", vec![]).await
70 }
71}