pub enum PcapError {
Show 16 variants
FileNotFound(String),
DirectoryNotFound(String),
InsufficientPermissions(String),
DiskSpaceFull(String),
InvalidFormat(String),
CorruptedHeader(String),
CorruptedData(String),
ChecksumMismatch {
expected: String,
actual: String,
},
InvalidPacketSize(String),
InvalidArgument(String),
InvalidState(String),
BufferOverflow(String),
OutOfMemory(String),
Io(Error),
Serialization(String),
Unknown(String),
}
Expand description
PCAP操作错误
Variants§
FileNotFound(String)
DirectoryNotFound(String)
InsufficientPermissions(String)
DiskSpaceFull(String)
InvalidFormat(String)
CorruptedHeader(String)
CorruptedData(String)
ChecksumMismatch
InvalidPacketSize(String)
InvalidArgument(String)
InvalidState(String)
BufferOverflow(String)
OutOfMemory(String)
Io(Error)
Serialization(String)
Unknown(String)
Implementations§
Source§impl PcapError
impl PcapError
Sourcepub fn error_code(&self) -> PcapErrorCode
pub fn error_code(&self) -> PcapErrorCode
获取错误代码
Sourcepub fn detailed_message(&self) -> String
pub fn detailed_message(&self) -> String
获取详细错误信息
Trait Implementations§
Source§impl Error for PcapError
impl Error for PcapError
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()
Source§impl From<DecodeError> for PcapError
从base64错误转换为PcapError
impl From<DecodeError> for PcapError
从base64错误转换为PcapError
Source§fn from(err: DecodeError) -> Self
fn from(err: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for PcapError
从std::string::FromUtf8Error错误转换为PcapError
impl From<FromUtf8Error> for PcapError
从std::string::FromUtf8Error错误转换为PcapError
Source§fn from(err: FromUtf8Error) -> Self
fn from(err: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PcapError
impl !RefUnwindSafe for PcapError
impl Send for PcapError
impl Sync for PcapError
impl Unpin for PcapError
impl !UnwindSafe for PcapError
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