#[non_exhaustive]pub enum SteamError {
Show 17 variants
Io(Error),
Connection(String),
ConnectionClosed,
Timeout(Duration),
JobFailed,
Cancelled,
Authentication(String),
Protocol(String),
Malformed(String),
Decompression(String),
Crypto(String),
InvalidArgument(String),
NotFound(String),
Json(Error),
Protobuf(DecodeError),
ProtobufEncode(EncodeError),
Other(String),
}Expand description
The error type used throughout the crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
A socket, file or pipe level failure.
Connection(String)
The connection to the Steam network could not be established, or was lost.
ConnectionClosed
The remote end closed the connection.
Timeout(Duration)
The operation did not complete within its deadline.
JobFailed
The server rejected the job (EMsg::DestJobFailed).
Cancelled
The operation was cancelled by the caller.
Authentication(String)
Authentication failed.
Protocol(String)
The peer sent data that does not match the protocol.
Malformed(String)
A message could not be decoded.
Decompression(String)
A compressed payload could not be decompressed.
Crypto(String)
A cryptographic operation failed.
InvalidArgument(String)
A caller supplied an argument the callee cannot work with.
NotFound(String)
The requested resource does not exist.
Json(Error)
JSON (de)serialisation failed.
Protobuf(DecodeError)
A protobuf payload could not be decoded.
ProtobufEncode(EncodeError)
A protobuf payload could not be encoded.
Other(String)
Anything that does not fit a more specific variant.
Implementations§
Source§impl SteamError
impl SteamError
Sourcepub fn connection(message: impl Display) -> Self
pub fn connection(message: impl Display) -> Self
Builds a SteamError::Connection from anything displayable.
Sourcepub fn protocol(message: impl Display) -> Self
pub fn protocol(message: impl Display) -> Self
Builds a SteamError::Protocol from anything displayable.
Sourcepub fn invalid_argument(message: impl Display) -> Self
pub fn invalid_argument(message: impl Display) -> Self
Builds a SteamError::InvalidArgument from anything displayable.
Trait Implementations§
Source§impl Debug for SteamError
impl Debug for SteamError
Source§impl Display for SteamError
impl Display for SteamError
Source§impl Error for SteamError
impl Error for SteamError
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
use the Display impl or to_string()
Source§impl From<AsyncJobFailedException> for SteamError
impl From<AsyncJobFailedException> for SteamError
Source§fn from(_: AsyncJobFailedException) -> Self
fn from(_: AsyncJobFailedException) -> Self
Source§impl From<AuthenticationException> for SteamError
impl From<AuthenticationException> for SteamError
Source§fn from(value: AuthenticationException) -> Self
fn from(value: AuthenticationException) -> Self
Converts into SteamError.
Source§impl From<DecodeError> for SteamError
impl From<DecodeError> for SteamError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Source§impl From<EncodeError> for SteamError
impl From<EncodeError> for SteamError
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Source§impl From<Error> for SteamError
impl From<Error> for SteamError
Source§impl From<Error> for SteamError
impl From<Error> for SteamError
Source§impl From<InvalidParamException> for SteamError
impl From<InvalidParamException> for SteamError
Source§fn from(value: InvalidParamException) -> Self
fn from(value: InvalidParamException) -> Self
Source§impl From<SteamKitWebRequestException> for SteamError
impl From<SteamKitWebRequestException> for SteamError
Source§fn from(value: SteamKitWebRequestException) -> Self
fn from(value: SteamKitWebRequestException) -> Self
Source§impl From<UnknownEnumValue> for SteamError
impl From<UnknownEnumValue> for SteamError
Source§fn from(value: UnknownEnumValue) -> Self
fn from(value: UnknownEnumValue) -> Self
Source§impl From<WebAPIRequestException> for SteamError
impl From<WebAPIRequestException> for SteamError
Source§fn from(value: WebAPIRequestException) -> Self
fn from(value: WebAPIRequestException) -> Self
Converts into SteamError.