aria2-protocol 0.3.10

Multi-protocol networking stack for aria2-rust: HTTP/HTTPS client, FTP/SFTP, full BitTorrent (DHT/PEX/MSE), and Metalink V3/V4 parser
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::sync::Once;

/// Install rustls' ring provider once before a protocol transport builds TLS.
///
/// Another crate may have installed a provider first; in that case rustls
/// rejects this installation and the caller keeps using the existing provider.
pub(crate) fn ensure_ring_provider() {
    static INIT: Once = Once::new();
    INIT.call_once(|| {
        let _ = rustls::crypto::ring::default_provider().install_default();
    });
}