rsiot/components/shared_tasks/cmp_websocket_client_general/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
use crate::components::shared_tasks;

#[allow(missing_docs)]
#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error(transparent)]
    BadUrl(#[from] url::ParseError),

    #[error("Deserialization error: {0}")]
    Deserialization(String),

    #[error("Serialization error: {0}")]
    Serialization(String),

    #[error("Error when setting up connection: {0}")]
    SetupConnection(String),

    #[error(transparent)]
    TaskMsgbusToMpsc(shared_tasks::msgbus_to_mpsc::Error),

    #[error(transparent)]
    TaskMpscToMsgBus(shared_tasks::mpsc_to_msgbus::Error),

    #[error("TaskConnectionState")]
    TaskConnectionState,

    #[error("TaskInput")]
    TaskInput,

    #[error("TaskOutput")]
    TaskOutput,

    #[error("TaskSend: {0}")]
    TaskSend(String),

    #[error("TaskReceive: {0}")]
    TaskReceive(String),

    #[error("JoinError: {source}")]
    TokioTaskJoin {
        #[from]
        source: tokio::task::JoinError,
    },

    #[error("TokioSyncMpsc")]
    TokioSyncMpsc,
}