Titouan Rigoudy
59a9f6bf90
Rename base_codec.rs to value_codec.rs.
5 years ago
Titouan Rigoudy
b18fe56f05
Rename Proto{En,De}code to Value{En,De}code.
5 years ago
Titouan Rigoudy
417edbf6bb
Fully remove bytes crate dep from base_codec.rs
5 years ago
Titouan Rigoudy
7bb290f0ef
Introduce ProtoEncodeError and use it in ProtoEncoder.
Tests are not fixed yet.
5 years ago
Titouan Rigoudy
97e380eab6
Simplify ProtoDecodeError conversion to io::Error.
5 years ago
Titouan Rigoudy
c9ffdc5392
Introduce ProtoDecodeError and use it in ProtoDecoder.
5 years ago
Titouan Rigoudy
9b81a6c3a6
Remove BytesMut from ProtoDecoder tests in base_codec.rs.
5 years ago
Titouan Rigoudy
468c404765
Simplify ProtoDecoder by removing dependency on the bytes crate.
Improve decoding error messages by annotating them with the position
at which the error was encountered. This could use some improvement
in a follow-up by introducing a specific Error type instead of
piggy-backing onto std::io::Error.
It is easier and more generically useful to accept any byte slice
as a buffer. In addition our zero-copy use of the underlying buffer
does not align particularly well with std::io::Read, so we move away
from std::io::Cursor as well.
5 years ago
Titouan Rigoudy
5894f425b0
Fix typo in base_codec.rs
5 years ago
Titouan Rigoudy
6dee714bfd
Run cargo fmt.
6 years ago
Titouan Rigoudy
a776151c9b
Use doc comments in base_codec.rs some more.
6 years ago
Titouan Rigoudy
c48673c390
Introduce ProtoDecoder instead of extending Buf trait.
7 years ago
Titouan Rigoudy
a1971b047e
Implement length-prefixed encoding for Tokio.
7 years ago
Titouan Rigoudy
d793f9e012
Unconditionally reserve u32 space in encode_u32.
7 years ago
Titouan Rigoudy
5d1a339ba5
Use {get,put}_u32_le instead of LittleEndian trait.
7 years ago
Titouan Rigoudy
2e64e5a9ff
Use BootstrapDecode instead of Buf as trait bound.
7 years ago
Titouan Rigoudy
0118354478
Implement Encode using ProtoEncode.
First step towards hiding ProtoEncode as an implementation detail and
only exposing Encode externally.
7 years ago
Titouan Rigoudy
e76ed364a6
Rename proto::codec to proto::base_codec.
7 years ago
Titouan Rigoudy
da6aa38593
Run rustfmt.
7 years ago
Titouan Rigoudy
f9de193b02
Fix unused imports.
7 years ago
Titouan Rigoudy
5a980dbba1
Replace ProtoDecode with Decode, remove ProtoDecoder.
7 years ago
Titouan Rigoudy
766d11d564
Remove DecodeError, use io::Error instead.
7 years ago
Titouan Rigoudy
24da031b3b
Implement Proto{De,En}code for pairs.
7 years ago
Titouan Rigoudy
2118586fee
Implement ProtoDecode for RoomJoinResponse.
7 years ago
Titouan Rigoudy
25a3250667
Implement ProtoEncode for RoomJoinResponse.
7 years ago
Titouan Rigoudy
0a58bfde91
Add round-trip encoding test for basic protocol types.
7 years ago
Titouan Rigoudy
65ef05ed06
Implement Proto{De,En}code for ServerRequest.
7 years ago
Titouan Rigoudy
de7025edc8
Implement ProtoDecode and ProtoEncode for peer messages.
7 years ago
Titouan Rigoudy
1f94a399fc
Add ServerTransport.
7 years ago
Titouan Rigoudy
fbaa25d57e
Run (deprecated, old, stable-compatible) rustfmt.
7 years ago
Titouan Rigoudy
92c30a6c6d
Introduce bytes crate, use it for Proto{De,En}code{,r}.
7 years ago
Titouan Rigoudy
87a6543cb9
Add vector serialization test to proto codec.
8 years ago
Titouan Rigoudy
13a4ff6fa5
Add proto::codec module with encoding and decoding for basic types.
8 years ago