pub enum ECIESErrorImpl {
Show 16 variants
IO(Error),
TagCheckDecryptFailed,
TagCheckHeaderFailed,
TagCheckBodyFailed,
InvalidAuthData,
InvalidAckData,
InvalidHeader,
Secp256k1(Error),
RLPDecoding(Error),
FromInt(TryFromIntError),
EncryptedDataTooSmall,
InitialHeaderBodyTooLarge {
body_size: usize,
max_body_size: usize,
},
OutOfBounds {
idx: usize,
len: usize,
},
InvalidHandshake {
expected: IngressECIESValue,
msg: Option<IngressECIESValue>,
},
UnreadableStream,
StreamTimeout,
}
Expand description
An error that occurs while reading or writing to an ECIES stream.
Variants§
IO(Error)
Error during IO
TagCheckDecryptFailed
Error when checking the HMAC tag against the tag on the message being decrypted
TagCheckHeaderFailed
Error when checking the HMAC tag against the tag on the header
TagCheckBodyFailed
Error when checking the HMAC tag against the tag on the body
InvalidAuthData
Error when parsing AUTH data
InvalidAckData
Error when parsing ACK data
InvalidHeader
Error when reading the header if its length is <3
Secp256k1(Error)
Error when interacting with secp256k1
RLPDecoding(Error)
Error when decoding RLP data
FromInt(TryFromIntError)
Error when converting to integer
EncryptedDataTooSmall
The encrypted data is not large enough for all fields
InitialHeaderBodyTooLarge
The initial header body is too large.
OutOfBounds
Error when trying to split an array beyond its length
InvalidHandshake
Error when handshaking with a peer (ack / auth)
Fields
expected: IngressECIESValue
The expected return value from the peer
msg: Option<IngressECIESValue>
The actual value returned from the peer
UnreadableStream
Error when the stream was closed by the peer for being unreadable.
This exact error case happens when the wrapped stream in
Framed
is closed by the peer, See
ConnectionReset
and the ecies codec fails to
decode a message from the (partially filled) buffer.
StreamTimeout
Error when data is not received from peer for a prolonged period.
Trait Implementations§
Source§impl Debug for ECIESErrorImpl
impl Debug for ECIESErrorImpl
Source§impl Display for ECIESErrorImpl
impl Display for ECIESErrorImpl
Source§impl Error for ECIESErrorImpl
impl Error for ECIESErrorImpl
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
Source§impl From<ECIESErrorImpl> for ECIESError
impl From<ECIESErrorImpl> for ECIESError
Source§fn from(source: ECIESErrorImpl) -> Self
fn from(source: ECIESErrorImpl) -> Self
Auto Trait Implementations§
impl Freeze for ECIESErrorImpl
impl !RefUnwindSafe for ECIESErrorImpl
impl Send for ECIESErrorImpl
impl Sync for ECIESErrorImpl
impl Unpin for ECIESErrorImpl
impl !UnwindSafe for ECIESErrorImpl
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 144 bytes
Size for each variant:
IO
: 16 bytesTagCheckDecryptFailed
: 0 bytesTagCheckHeaderFailed
: 0 bytesTagCheckBodyFailed
: 0 bytesInvalidAuthData
: 0 bytesInvalidAckData
: 0 bytesInvalidHeader
: 0 bytesSecp256k1
: 12 bytesRLPDecoding
: 32 bytesFromInt
: 0 bytesEncryptedDataTooSmall
: 0 bytesInitialHeaderBodyTooLarge
: 24 bytesOutOfBounds
: 24 bytesInvalidHandshake
: 144 bytesUnreadableStream
: 0 bytesStreamTimeout
: 0 bytes