expression

RootCertStore: explicit trust anchors

A root store contains trust anchors for certificate path verification. An empty store intentionally trusts no roots. Constructing it is not a successful TLS connection; an application must populate it from an approved trust source. External crate example; candidate dependency is not approved for deployment. Expected stdout (not executed): true 0 Common mistake: Treating an empty root store as automatic operating-system trust.

Formal Syntax & Structure

rust syntaxrust
rustls::RootCertStore::empty()

Working Example

Example Snippetrust
fn main() {    let roots = rustls::RootCertStore::empty();    println!("{} {}", roots.is_empty(), roots.len());}
Rust Reference