reception 0.1.2

A Rust library for creating TCP listeners that spawns clients providing model abstraction layer.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use thiserror::Error;

use tokio_tungstenite::tungstenite::Message;

#[derive(Error, Debug)]
pub enum ConnectionError<E> {
    #[error("received an error from websocket library")]
    WebSocket(#[source] tokio_tungstenite::tungstenite::Error),

    #[error("received an illegal message type. Message length: {}", .0.len())]
    IllegalMessageType(Message),

    #[error("failed to queue up a data package from server to peer")]
    QueueServerMessage(#[source] E),
}