nardol/
lib.rs

1#![warn(missing_docs)]
2
3//! Nardol is a framework built on top of Tcp from [std::net] mostly providing structure
4//! to data sent and received.
5//!
6//! Nardol is named after one of warning beacons of Gondor as those were also mean of communicating.
7
8/// Contains [Bytes] new type struct around [Vec] of [u8] that is used throughout
9/// this library to hold data in byte format and implementations of [TryFrom] for it.
10mod bytes;
11
12/// [Error type](std::error::Error) for this library.
13mod error;
14
15/// Contains traits that need to be implemented for data to be send and receive on network.
16mod message;
17
18/// Module containing [Packet] and [PacketKind].
19mod packet;
20
21/// Module containing [FromRon] and [ToRon] traits.
22///
23/// Those traits have default methods so they do not need any work on implementation.
24mod ron;
25
26// Re-exports of all public types.
27
28pub use crate::bytes::Bytes;
29pub use crate::error::{Error, ErrorKind};
30pub use crate::message::{
31    ContentType, ContextType, MetaDataType, OutputType, TcpMessage, UdpMessage,
32};
33pub use crate::packet::{Packet, PacketKind};
34pub use crate::ron::{FromRon, ToRon};