pub enum ClamScanResult {
Ok,
Found(String, String),
Error(String),
}
Expand description
ClamScanResult
Provides a match
‘friendly’ interface for receiving the result of a scan.
Variants§
Ok
An Ok
response means that Clam found no virus in the given file/directory.
Found(String, String)
A Found
response means that Clam did find one or more virus(’s) in the given file/directory,
the first value of Found
is the location where the virus was found, and the second value is
the name of the virus detected.
Note: When performing a stream scan, the location is redundant, and will always be instream
.
Error(String)
An Error
response means that Clam encountered an error whilst processing the request,
for example, if the given file/directory couldn’t be found.
Implementations§
Source§impl ClamScanResult
impl ClamScanResult
Sourcepub fn parse<T: AsRef<str>>(s_string: T) -> Vec<ClamScanResult>
pub fn parse<T: AsRef<str>>(s_string: T) -> Vec<ClamScanResult>
ClamScanResult::parse
takes a Clam scan result string and parses into into a Vec<ClamScanResult
.
A vec must be used because Clam may scan multiple files in one request, or may encounter
multuple errors.
Note: If performing a stream scan, the result will be converted to a single ClamScanResult
by
the caller.
Trait Implementations§
Source§impl Clone for ClamScanResult
impl Clone for ClamScanResult
Source§fn clone(&self) -> ClamScanResult
fn clone(&self) -> ClamScanResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more