lobe-core 0.1.2

Local HTTP performance profiling engine — the shared library behind the Lobe CLI. Captures DNS/TCP/TLS/TTFB/download phases per request with grounded network baselines.
Documentation
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum TlsStatus {
    NotUsed,
    HandshakeSucceeded,
    HandshakeFailed,
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct CertificateInfo {
    pub subject: String,
    pub issuer: String,
    pub not_before: Option<String>,
    pub not_after: Option<String>,
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct TlsReport {
    pub enabled: bool,
    pub status: TlsStatus,
    pub version: Option<String>,
    pub cipher_suite: Option<String>,
    pub certificate: Option<CertificateInfo>,
    pub error_message: Option<String>,
}