betfair_stream_api/
error.rs1#[expect(clippy::module_name_repetitions)]
3#[non_exhaustive]
4#[derive(Debug, thiserror::Error)]
5pub enum StreamError {
7 #[error("IO Error {0}")]
9 IoError(#[from] std::io::Error),
10 #[error("JSON Error {0}")]
12 JsonError(#[from] serde_json::Error),
13 #[error("No data")]
15 NoData,
16 #[error("Unexpected response {0}")]
18 UnexpectedResponse(String),
19 #[error("Connection ID not present")]
21 ConnectionIdNotPresent,
22 #[error("Misconfigured stream URL")]
24 MisconfiguredStreamURL,
25 #[error("Stream processor malfunctioned")]
27 StreamProcessorMalfunction,
28 #[error("Host string not present in the Stream URL")]
30 HostStringNotPresent,
31 #[error("Unable to look up host {host}:{port}")]
33 UnableToLookUpHost { host: String, port: u16 },
34 #[error("Unable to convert domain to server name")]
36 UnableConvertDomainToServerName,
37 #[error("Unable to connect to TLS stream")]
39 UnableConnectToTlsStream,
40 #[error("Unable to set native certificate")]
42 CannotSetNativeCertificate,
43 #[error("Unable to set custom certificate")]
45 UnableToSetCustomCertificate,
46 #[error("Unable to set custom certificate")]
48 CustomCertificateNotSet,
49 #[error("Invalid custom certificate")]
51 InvalidCustomCertificate,
52 #[error("Unable to load local certificate")]
54 LocalCertificateLoadError,
55}