tl-proto-0.1.8 has been yanked.
tl-proto

A collection of traits for working with TL serialization/deserialization.
Example
use ;
;
Specification
| Type | Pseudocode |
|---|---|
() |
[] |
i32,u32,i64,u64 |
little_endian(x) |
true |
[0xb5, 0x75, 0x72, 0x99] |
false |
[0x37, 0x97, 0x79, 0xbc] |
[u8; N], N % 4 ≡ 0) |
[…x] |
Vec<u8>, len < 254) |
[len as u8, …x, …padding_to_4(len)] |
Vec<u8>, len ≥ 254) |
[254, …little_endian(x)[0..=2], …x, …padding_to_4(len)] |
Vec<T> |
[…little_endian(len as u32), …map(…x, repr)] |
(T0, … , Tn) |
[…repr(T0), … , …repr(Tn)] |
Option<T> |
{ Some(x) ⇒ repr(x), None ⇒ [] } |
enum { T0, …, Tn } |
{ T0(x) ⇒ […id(T0), …repr(x)], …, Tn(x) ⇒ […id(Tn), …repr(x)] } |