tls_api/
info.rs

1use crate::assert_send;
2use crate::assert_sync;
3use std::fmt;
4
5/// Basic info about the implementation.
6#[derive(Debug, Clone, Default)]
7pub struct ImplInfo {
8    /// Implementation name (usually the name of crate the underlying implementation).
9    pub name: &'static str,
10    /// Some unspecified version number (e. g. openssl library version for openssl implementation).
11    pub version: &'static str,
12}
13
14fn _assert_kinds() {
15    assert_send::<ImplInfo>();
16    assert_sync::<ImplInfo>();
17}
18
19impl fmt::Display for ImplInfo {
20    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
21        write!(f, "{}={}", self.name, self.version)
22    }
23}