Expand description
§clam_client - a client implementation for ClamAV written in Rust.
clam_client
, provides a simple interface to all basic ClamAV functionality, currently
the only thing missing is sessions/multi threaded scanning, which may or may not be added
depending on demand.
§Example
extern crate clam_client;
use clam_client::client::ClamClient;
use std::env;
fn main() {
if let Some(path) = env::args().nth(1) {
let client = ClamClient::new("127.0.0.1", 3310).unwrap();
println!(
"Scan for '{}':\n\t{:?}\n",
path,
client.scan_path(&path, true).unwrap()
);
} else {
println!("USAGE: cargo run --example simple \"<file_path>\"");
}
}
Modules§
- client
ClamClient
provides the bridge between the Rust code and the ClamD socket, and implements most Clam commands in a Rust idiomatic interface.- error
- Simple error interface for clam_client. This simply wraps other common error types, the reason for this is two-fold:
- response
- The
response
module is responsibe for parsing the responses issued to use by ClamAV. To do so, it relies on two external crates, namely,nom
andchrono
.