#[non_exhaustive]pub enum I2pError {
AlreadyRunning,
InvalidAppName,
WorkerPanicked,
DestinationCreationFailed,
KeyGenerationFailed,
ConnectFailed,
DestinationClosed,
Io(Error),
}Expand description
Errors that can occur while starting the router, creating a destination, or using a stream.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AlreadyRunning
Another I2pRouter is still running in this process. Once the last
clone of it has been dropped, a fresh start succeeds.
The exception is a router whose start panicked inside libi2pd: the globals are then in an
unknown state, and every later start in that process returns this error rather than
re-initializing over them.
InvalidAppName
The application name contained an interior NUL byte and can’t cross the C ABI.
WorkerPanicked
The blocking worker task backing an async call panicked – a bug in this crate or libi2pd.
DestinationCreationFailed
libi2pd failed to create the destination. Its API reports no further detail.
KeyGenerationFailed
libi2pd failed to generate a new destination keypair.
ConnectFailed
Destination::connect timed out or failed – most often
because a tunnel had to be built over the live network first, which takes seconds to
minutes.
DestinationClosed
The destination was dropped while an accept was pending.
Io(Error)
An I/O error occurred reading/writing a persistent keys file.
Trait Implementations§
Source§impl Error for I2pError
impl Error for I2pError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()