pub enum ClamAVClientError {
UnableToConnect(Error),
InvalidSocketAddress(Error),
InvalidUTf8(Error),
UnableToParseResponse(String),
UnableToWriteToStream(Error),
}Variants§
UnableToConnect(Error)
If unable to establish a TcpStream with the ClamAV instance.
InvalidSocketAddress(Error)
If the socket address passed to [scan] or [ping] is invalid.
eg.
use clamav_tcp;
assert_eq!(clamav_tcp::ping("hello world").is_err(), true);use clamav_tcp;
assert_eq!(clamav_tcp::ping("127.0.0.1:3310").is_ok(), true);InvalidUTf8(Error)
When parsing the ClamAV response and the response is not valid UTF-8.
UnableToParseResponse(String)
When the response is valid UTF-8 but it cannot be mapped to a struct.
UnableToWriteToStream(Error)
Unable to write to the TcpStream.
Trait Implementations§
Source§impl Debug for ClamAVClientError
impl Debug for ClamAVClientError
Source§impl Display for ClamAVClientError
impl Display for ClamAVClientError
Source§impl Error for ClamAVClientError
impl Error for ClamAVClientError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ClamAVClientError
impl !RefUnwindSafe for ClamAVClientError
impl Send for ClamAVClientError
impl Sync for ClamAVClientError
impl Unpin for ClamAVClientError
impl !UnwindSafe for ClamAVClientError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more