pub enum RelayError {
Transport(TransportError),
Protocol {
kind: ProtocolErrorKind,
details: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Config(ConfigValidationError),
Frame(FrameError),
Connection(ConnectionError),
Client {
kind: ClientErrorKind,
client_addr: SocketAddr,
details: String,
},
Init(InitializationError),
}
Variants§
Transport(TransportError)
Protocol
Config(ConfigValidationError)
Frame(FrameError)
Connection(ConnectionError)
Client
Init(InitializationError)
Implementations§
Source§impl RelayError
impl RelayError
pub fn protocol(kind: ProtocolErrorKind, details: impl Into<String>) -> Self
pub fn protocol_with_source( kind: ProtocolErrorKind, details: impl Into<String>, source: impl Into<Box<dyn Error + Send + Sync>>, ) -> Self
pub fn connection(kind: ConnectionError) -> Self
pub fn config(kind: ConfigValidationError) -> Self
pub fn frame( kind: FrameErrorKind, details: impl Into<String>, frame_data: Option<Vec<u8>>, ) -> Self
pub fn client( kind: ClientErrorKind, client_addr: SocketAddr, details: impl Into<String>, ) -> Self
Trait Implementations§
Source§impl Debug for RelayError
impl Debug for RelayError
Source§impl Display for RelayError
impl Display for RelayError
Source§impl Error for RelayError
impl Error for RelayError
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()
Source§impl From<BackoffError> for RelayError
impl From<BackoffError> for RelayError
Source§fn from(err: BackoffError) -> Self
fn from(err: BackoffError) -> Self
Converts to this type from the input type.
Source§impl From<ConfigError> for RelayError
impl From<ConfigError> for RelayError
Source§fn from(err: ConfigError) -> Self
fn from(err: ConfigError) -> Self
Converts to this type from the input type.
Source§impl From<ConfigValidationError> for RelayError
impl From<ConfigValidationError> for RelayError
Source§fn from(source: ConfigValidationError) -> Self
fn from(source: ConfigValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ConnectionError> for RelayError
impl From<ConnectionError> for RelayError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Converts to this type from the input type.
Source§impl From<FrameError> for RelayError
impl From<FrameError> for RelayError
Source§fn from(source: FrameError) -> Self
fn from(source: FrameError) -> Self
Converts to this type from the input type.
Source§impl From<InitializationError> for RelayError
impl From<InitializationError> for RelayError
Source§fn from(source: InitializationError) -> Self
fn from(source: InitializationError) -> Self
Converts to this type from the input type.
Source§impl From<RtsError> for RelayError
impl From<RtsError> for RelayError
Source§impl From<TransportError> for RelayError
impl From<TransportError> for RelayError
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RelayError
impl !RefUnwindSafe for RelayError
impl Send for RelayError
impl Sync for RelayError
impl Unpin for RelayError
impl !UnwindSafe for RelayError
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