Debian Codegraph @

debian/rust-vendor/procfs/src/crypto.rs

raw
1
2 use procfs_core::ProcResult;
3 pub use procfs_core::CryptoTable;
4
5 use crate::Current;
6
7 impl Current for CryptoTable {
8 const PATH: &'static str = "/proc/crypto";
9 }
10
11 pub fn crypto() -> ProcResult<CryptoTable> {
12 CryptoTable::current()
13 }
14
15
16 #[cfg(test)]
17 mod tests {
18 use super::*;
19
20 #[test]
21 fn read_crypto() {
22 let table = crypto();
23 let table = table.expect("CrytoTable should have been read");
24 assert!(!table.crypto_blocks.is_empty(), "Crypto table was empty");
25 }
26 }