pub enum RLanLibError {
Wire(String),
NotifierSendError(SendError<Box<ScanMessage>>),
PacketReaderLock(String),
PacketSenderLock(String),
ThreadError(String),
ChannelReceive(RecvError),
ArpPacketBuild(ArpPacketBuilderError),
RstPacketBuild(RstPacketBuilderError),
SynPacketBuild(SynPacketBuilderError),
HeartbeatPacketBuild(HeartbeatPacketBuilderError),
Scan {
error: String,
ip: Option<String>,
port: Option<String>,
},
}Expand description
Custom Error type for this library
Variants§
Wire(String)
Error coming directly off the wire
NotifierSendError(SendError<Box<ScanMessage>>)
Errors resulting from events channel
PacketReaderLock(String)
Error obtaining lock on packet reader
PacketSenderLock(String)
Error obtaining lock on packet sender
ThreadError(String)
Generic thread error
ChannelReceive(RecvError)
Errors when consuming messages from channels
ArpPacketBuild(ArpPacketBuilderError)
Error generated during ARP packet construction
RstPacketBuild(RstPacketBuilderError)
Error generated during RST packet construction
SynPacketBuild(SynPacketBuilderError)
Error generated during SYN packet construction
HeartbeatPacketBuild(HeartbeatPacketBuilderError)
Error generated during heartbeat packet construction
Scan
Wrapping errors related to scanning
Implementations§
Source§impl RLanLibError
impl RLanLibError
Sourcepub fn from_net_addr_parse_error(ip: &str, error: AddrParseError) -> Self
pub fn from_net_addr_parse_error(ip: &str, error: AddrParseError) -> Self
Converter for std::net::AddrParseError
Sourcepub fn from_ipnet_addr_parse_error(ip: &str, error: AddrParseError) -> Self
pub fn from_ipnet_addr_parse_error(ip: &str, error: AddrParseError) -> Self
Converter for ipnet::AddrParseError
Sourcepub fn from_port_parse_int_err(port: &str, error: ParseIntError) -> Self
pub fn from_port_parse_int_err(port: &str, error: ParseIntError) -> Self
Converter for ParseIntError
Sourcepub fn from_channel_send_error(e: SendError<ScanMessage>) -> Self
pub fn from_channel_send_error(e: SendError<ScanMessage>) -> Self
Converter for channel send errors
Trait Implementations§
Source§impl Debug for RLanLibError
impl Debug for RLanLibError
Source§impl Display for RLanLibError
impl Display for RLanLibError
Source§impl Error for RLanLibError
impl Error for RLanLibError
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<ArpPacketBuilderError> for RLanLibError
impl From<ArpPacketBuilderError> for RLanLibError
Source§fn from(source: ArpPacketBuilderError) -> Self
fn from(source: ArpPacketBuilderError) -> Self
Converts to this type from the input type.
Source§impl From<HeartbeatPacketBuilderError> for RLanLibError
impl From<HeartbeatPacketBuilderError> for RLanLibError
Source§fn from(source: HeartbeatPacketBuilderError) -> Self
fn from(source: HeartbeatPacketBuilderError) -> Self
Converts to this type from the input type.
Source§impl<'a> From<PoisonError<MutexGuard<'a, dyn Reader + 'static>>> for RLanLibError
impl<'a> From<PoisonError<MutexGuard<'a, dyn Reader + 'static>>> for RLanLibError
Source§fn from(value: PoisonError<MutexGuard<'a, dyn Reader + 'static>>) -> Self
fn from(value: PoisonError<MutexGuard<'a, dyn Reader + 'static>>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<PoisonError<MutexGuard<'a, dyn Sender + 'static>>> for RLanLibError
impl<'a> From<PoisonError<MutexGuard<'a, dyn Sender + 'static>>> for RLanLibError
Source§fn from(value: PoisonError<MutexGuard<'a, dyn Sender + 'static>>) -> Self
fn from(value: PoisonError<MutexGuard<'a, dyn Sender + 'static>>) -> Self
Converts to this type from the input type.
Source§impl From<RecvError> for RLanLibError
impl From<RecvError> for RLanLibError
Source§impl From<RstPacketBuilderError> for RLanLibError
impl From<RstPacketBuilderError> for RLanLibError
Source§fn from(source: RstPacketBuilderError) -> Self
fn from(source: RstPacketBuilderError) -> Self
Converts to this type from the input type.
Source§impl From<SendError<Box<ScanMessage>>> for RLanLibError
impl From<SendError<Box<ScanMessage>>> for RLanLibError
Source§impl From<SynPacketBuilderError> for RLanLibError
impl From<SynPacketBuilderError> for RLanLibError
Source§fn from(source: SynPacketBuilderError) -> Self
fn from(source: SynPacketBuilderError) -> Self
Converts to this type from the input type.
impl Send for RLanLibError
impl Sync for RLanLibError
Auto Trait Implementations§
impl Freeze for RLanLibError
impl RefUnwindSafe for RLanLibError
impl Unpin for RLanLibError
impl UnwindSafe for RLanLibError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more