pub enum Error {
MaxBufferSize(usize),
BadEncodingIdentity,
EncodingVersion(u16, u16),
EncodingKind(u8),
PatternMismatch(String),
BadKeypairPem,
NotTransportState,
Io(Error),
Snow(Error),
Pem(PemError),
Json(Error),
}
Expand description
Errors generated by the relay protocol.
Variants§
MaxBufferSize(usize)
Error generated a buffer is too large.
BadEncodingIdentity
Error generated when encoding identity bytes are invalid.
EncodingVersion(u16, u16)
Error generated when encoding versions are mismatched.
EncodingKind(u8)
Error generated decoding the kind for an encoding is invalid.
PatternMismatch(String)
Error generated when the noise pattern in a PEM does not match the pattern in use by the protocol.
BadKeypairPem
Error generated when the PEM encoding does not match the expected format.
NotTransportState
Error generated when a node expects to be in the transport protocol state.
Io(Error)
Error generated by input/output.
Snow(Error)
Error generated by the noise protocol library.
Pem(PemError)
Error generated decoding PEM data.
Json(Error)
Error generated serializing or deserializing JSON.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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