Crate nardol

Source
Expand description

Nardol is a framework built on top of Tcp from std::net mostly providing structure to data sent and received.

Nardol is named after one of warning beacons of Gondor as those were also mean of communicating.

Structs§

Bytes
Wrapper around Vec of u8 used to store data in form of bytes in this library.
Error
Used as an Error type throughout this library.
Packet
Gives structure to data to be sent or received from stream.

Enums§

ErrorKind
Enum containing all error kinds used in nardol.
PacketKind
Determines kind of Packet.

Traits§

ContentType
Trait that needs to be implemented for type that will be used as content inside a message.
ContextType
Trait that marks data as Context, that can be used inside MetaDataType and ContentType methods.
FromRon
Trait with default method, that allows to create an implementor from given RON.
MetaDataType
Trait that needs to be implemented for type that will be used as metadata inside a message.
OutputType
Trait that marks data as Output, that can be used inside MetaDataType and ContentType methods.
TcpMessage
Trait that allows implementor to send and receive itself via TcpStream with provided TcpMessage::send and TcpMessage::receive.
ToRon
Trait with default methods that allow implementors parse them to RON format.
UdpMessage
Trait that allows implementor to send and receive itself on UdpSocket with provided methods.