[][src]Crate agilulf_protocol

This crate contains the most part of serialize and deserialize Agilulf KV Protocol

The core function of this crate is provided by these methods:

  1. into_command_stream in request.rs. This will convert a TcpStream into a Stream<Command>

  2. into_reply_sink in reply.rs. This will convert a TcpSink into a Sink<Reply>

  3. The implementation of Into<Vec<u8>> for Command and Reply. As this crate provides both serialization and deserialization for both client and server. So they are all needed.

Re-exports

pub use reply::Reply;
pub use reply::Status;
pub use request::Command;
pub use request::DeleteCommand;
pub use request::GetCommand;
pub use request::PutCommand;
pub use request::ScanCommand;

Modules

reply
request

Structs

AsyncReadBuffer

A Read buffer to provide read_exact and read_line methods.

AsyncWriteBuffer

Actually this struct doesn't have any buffer. It's only a wrapper for AsyncWrite

Slice

In the most time of this project, the key or value will be represented by a so called Slice (actually not a slice but a Vec<u8>).

Enums

DatabaseError
ProtocolError

Type Definitions

DatabaseResult
Result