pub enum ErrorKind {
Show 17 variants
TooBigPacket,
InvalidPacketKind,
UnknownPacketKind,
SerializingFailed,
DeserializingFailed,
InvalidBufferSize,
WritingToStreamFailed,
ReadingFromStreamFailed,
SendingToAddressFailed,
ReceivingFromAddressFailed,
CreatingDirFailed,
CreatingFileFailed,
OpeningFileFailed,
WritingToFileFailed,
ReadingFromFileFailed,
ParsingFailed,
OtherSource(Box<dyn Error>),
}
Expand description
Enum containing all error kinds used in nardol.
Variants
TooBigPacket
Used if Packet size is bigger than MAX_PACKET_SIZE.
InvalidPacketKind
Used if packet kind was not expected or a function or a method was used on wrong PacketKind variant.
UnknownPacketKind
Used if fails to recognize PacketKind.
SerializingFailed
Used if serializing struct with serde fails.
DeserializingFailed
Used if deserializing struct with serde fails.
InvalidBufferSize
Used if buffer size is not valid for the operation,
usually used in implementations of TryFrom<Bytes>
.
WritingToStreamFailed
Used if an error occurs during writing to TcpStream.
ReadingFromStreamFailed
Used if an error occurs during reading from TcpStream.
SendingToAddressFailed
Used if and error occurs during sending data to the address using an UdpSocket
ReceivingFromAddressFailed
Used if and error occurs during receiving data from the address using an UdpSocket
CreatingDirFailed
Used if an error occurs while trying to create a directory.
CreatingFileFailed
Used if an error occurs while trying to create a file.
OpeningFileFailed
Used if an error occurs while trying to open a file.
WritingToFileFailed
Used if an error occurs while trying to write to a file.
ReadingFromFileFailed
Used if an error occurs while trying to read from a file.
ParsingFailed
Used if anything fails to parse.
OtherSource(Box<dyn Error>)
Wrapper around every error not originating from this library, used if there is a need to use produced error directly.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ErrorKind
impl !Send for ErrorKind
impl !Sync for ErrorKind
impl Unpin for ErrorKind
impl !UnwindSafe for ErrorKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more