Enum P2PError
Source pub enum P2PError {
Show 15 variants
Network(String),
DHT(String),
Transport(String),
Security(String),
MCP(String),
Bootstrap(String),
Config(String),
Cryptography(String),
Identity(String),
Storage(String),
InvalidState(String),
InvalidInput(String),
IO(Error),
Serialization(Error),
Generic(Error),
}
Expand description
Main error type for P2P Foundation
Network-related error (connections, peers, protocols)
DHT operation error (lookups, storage, routing)
Transport layer error (QUIC, TCP, tunneling)
Security-related error (authentication, encryption, validation)
MCP server error (tool calls, message routing)
Bootstrap cache error (peer discovery, cache management)
Configuration error (invalid settings, missing parameters)
Cryptography error (key generation, encryption, signatures)
Identity management error (profiles, authentication, verification)
Storage error (encryption, persistence, data integrity)
Invalid state error (operations in wrong state)
Invalid input error (bad parameters, malformed data)
IO error (file operations, network IO)
Serialization error (JSON, protocol encoding/decoding)
Generic error (catch-all for other error types)
Formats the value using the given formatter.
Read more
Formats the value using the given formatter.
Read more
Returns the lower-level source of this error, if any.
Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports.
Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Instruments this type with the provided
Span, returning an
Instrumented wrapper.
Read more
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
Converts the given value to a
String.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.