busyrpc/
lib.rs

1#![doc = include_str!("../README.md")]
2
3use biometrics::Collector;
4
5mod buffers;
6mod channel;
7mod client;
8mod poll;
9mod resolve;
10mod server;
11
12pub mod builtins;
13
14pub use client::{new_client, ClientOptions};
15pub use resolve::StringResolver;
16pub use server::{Server, ServerOptions, ServiceRegistry};
17
18//////////////////////////////////////////// biometrics ////////////////////////////////////////////
19
20/// Register the biometrics for this crate.
21pub fn register_biometrics(collector: &mut Collector) {
22    client::register_biometrics(collector);
23    channel::register_biometrics(collector);
24    server::register_biometrics(collector);
25    poll::register_biometrics(collector);
26}
27
28//////////////////////////////////////////// SslOptions ////////////////////////////////////////////
29
30/// SSL options for client or server.
31#[derive(Clone, Debug, Default, Eq, PartialEq)]
32#[cfg_attr(feature = "binaries", derive(arrrg_derive::CommandLine))]
33pub struct SslOptions {
34    /// SSL/TLS ca_file.
35    #[cfg_attr(feature = "binaries", arrrg(required, "Path to the CA certificate."))]
36    pub ca_file: String,
37    /// SSL/TLS private key.
38    #[cfg_attr(feature = "binaries", arrrg(required, "Path to the private key file."))]
39    pub private_key_file: String,
40    /// SSL/TLS certificate.
41    #[cfg_attr(feature = "binaries", arrrg(required, "Path to the certificate file."))]
42    pub certificate_file: String,
43}
44
45////////////////////////////////////////////// indicio /////////////////////////////////////////////
46
47pub static COLLECTOR: indicio::Collector = indicio::Collector::new();