[−][src]Crate serde_mtproto
Serde MTProto
MTProto is a mobile-first protocol for access to a server API. This crate provides means to serialize Rust types to its binary representation and to deserialize from said representation.
Modules
de | Deserialize MTProto binary representation to a Rust data structure. |
error | When serializing or deserializing MTProto goes wrong. |
helpers | Helper types for assisting in some deserialization scenarios. |
identifiable |
|
ser | Serialize a Rust data structure into its MTProto binary representation. |
sized |
|
wrappers | Wrapper structs for attaching additional data to a type for deserialization purposes. |
Structs
Boxed | A struct that wraps an |
ByteBuf | Wrapper around |
Bytes | Wrapper around |
Deserializer | A structure that deserializes MTProto binary representation into Rust values. |
Error | The Error type. |
Serializer | A structure for serializing Rust values into MTProto binary representation. |
UnsizedByteBuf | A byte buffer which doesn't write its length when serialized. |
UnsizedByteBufSeed | An unsized byte buffer seed with the length of the byte sequence to be deserialized. |
WithSize | A struct that wraps a |
Enums
ErrorKind | The kind of an error. |
Traits
Identifiable | A trait for a Rust data structure that can have an id. |
MtProtoSized | A trait for a Rust data structure a predictable size of its MTProto binary representation can be computed. |
ResultExt | Additional methods for |
Functions
from_bytes | Deserialize an instance of type |
from_bytes_reuse | Deserialize an instance of type |
from_bytes_seed | Deserialize an instance of type |
from_reader | Deserialize an instance of type |
from_reader_reuse | Deserialize an instance of type |
from_reader_seed | Deserialize an instance of type |
size_hint_from_byte_seq_len | Helper function for everything naturally representable as a byte sequence. |
to_bytes | Serialize the given data structure as a byte vector of binary MTProto. |
to_writer | Serialize the given data structure as binary MTProto into the IO stream. |
unsized_bytes_pad_to_bytes | Serialize bytes with padding to 16 bytes as a byte vector of binary MTProto. |
unsized_bytes_pad_to_writer | Serialize bytes with padding to 16 bytes into the IO stream. |
Type Definitions
Result | Convenient wrapper around |
WithId |