browser-commander 0.14.0

Universal browser automation library that supports multiple browser engines with a unified API
Documentation
// @generated by scripts/generate-puppeteer-bindings.mjs from
// rust/protocol/puppeteer/api.json. Do not edit by hand.

#![allow(clippy::all, missing_docs, unused_imports, non_snake_case)]

use serde_json::Value;

use super::*;
use crate::puppeteer::bridge::{binary, remote_type, BridgeError, JsFunction, Remote};

remote_type!(
    /// Puppeteer's `SecurityDetails` (puppeteer-core 25.10.0), a remote object
    /// served by `browser-commander serve --stdio`.
    SecurityDetails
);

impl SecurityDetails {
    /// `SecurityDetails.issuer`
    ///
    /// ```text
    /// issuer(): string
    /// ```
    pub async fn issuer(&self) -> Result<String, BridgeError> {
        self.remote.call("issuer", vec![]).await
    }

    /// `SecurityDetails.validFrom`
    ///
    /// ```text
    /// validFrom(): number
    /// ```
    pub async fn valid_from(&self) -> Result<f64, BridgeError> {
        self.remote.call("validFrom", vec![]).await
    }

    /// `SecurityDetails.validTo`
    ///
    /// ```text
    /// validTo(): number
    /// ```
    pub async fn valid_to(&self) -> Result<f64, BridgeError> {
        self.remote.call("validTo", vec![]).await
    }

    /// `SecurityDetails.protocol`
    ///
    /// ```text
    /// protocol(): string
    /// ```
    pub async fn protocol(&self) -> Result<String, BridgeError> {
        self.remote.call("protocol", vec![]).await
    }

    /// `SecurityDetails.subjectName`
    ///
    /// ```text
    /// subjectName(): string
    /// ```
    pub async fn subject_name(&self) -> Result<String, BridgeError> {
        self.remote.call("subjectName", vec![]).await
    }

    /// `SecurityDetails.subjectAlternativeNames`
    ///
    /// ```text
    /// subjectAlternativeNames(): string[]
    /// ```
    pub async fn subject_alternative_names(&self) -> Result<Vec<String>, BridgeError> {
        self.remote.call("subjectAlternativeNames", vec![]).await
    }
}