bun_http 0.1.0

A Rust-native programmable browser runtime built on Servo and SpiderMonkey
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::HTTPCertError;

pub struct CertificateInfo {
    pub cert: Box<[u8]>,
    pub cert_error: HTTPCertError,
    pub hostname: Box<[u8]>,
}

// PORT NOTE: Zig `deinit` took an allocator and freed `cert`, `cert_error.code`,
// `cert_error.reason`, and `hostname`. In Rust these are `Box<[u8]>` (here and
// in `HTTPCertError`) and drop automatically at scope exit — no explicit `Drop`
// impl needed. The allocator param is deleted per §Allocators.

// ported from: src/http/CertificateInfo.zig