Enum mpc_relay_client::Error
source · pub enum Error {
Show 18 variants
ConnectError(StatusCode, String),
ServerError(StatusCode, String),
NoReply,
PeerAlreadyExists,
PeerAlreadyExistsMaybeRace,
PeerNotFound(String),
NotHandshakeState,
NotTransportState,
InvalidPeerHandshakeMessage,
WebSocketSend,
StreamReunite,
Io(Error),
Protocol(Error),
Snow(Error),
Json(Error),
Websocket(Error),
RequestMpscSend(SendError<InternalMessage>),
ResponseMpscSend(SendError<ResponseMessage>),
}
Expand description
Errors generated by the relay client.
Variants§
ConnectError(StatusCode, String)
Error generated attempting to connect to the websocket server when the response is not a 101 switching protocols status code.
ServerError(StatusCode, String)
Error generated by the server.
NoReply
Error generated if the client expects a reply but none was received.
PeerAlreadyExists
Error generated attempting to handshake with a peer that already exists.
PeerAlreadyExistsMaybeRace
Error generated attempting to handshake with a peer that already exists.
PeerNotFound(String)
Error generated when a peer could not be found.
NotHandshakeState
Error generated when a node expects to be in the handshake protocol state.
NotTransportState
Error generated when a node expects to be in the transport protocol state.
InvalidPeerHandshakeMessage
Error generated when the wrong type of message is encountered during a peer to peer handshake.
WebSocketSend
Error generated when the client fails to write to the websocket.
StreamReunite
Error generated when the native client fails to reunite the stream and sink.
Io(Error)
Error generated by input/output.
Protocol(Error)
Error generated by the protocol library.
Snow(Error)
Error generated by the noise protocol library.
Json(Error)
Error generated serializing or deserializing JSON.
Websocket(Error)
Error generated by the client websocket library.
RequestMpscSend(SendError<InternalMessage>)
Error generated sending a request over a channel.
ResponseMpscSend(SendError<ResponseMessage>)
Error generated sending a response over a channel.