pub trait TlWrite {
    const TL_WRITE_BOXED: bool;

    fn max_size_hint(&self) -> usize;
    fn write_to<P>(&self, packet: &mut P)
    where
        P: TlPacket
; }
Expand description

Specifies how this type can be written to the packet

Required Associated Constants

Required Methods

Max required number of bytes

Implementations on Foreign Types

Skips serialization if None, serializes as T otherwise

ton::bytes - 1 or 4 bytes of len, then len bytes of data (aligned to 4)

ton::bytes - 1 or 4 bytes of len, then len bytes of data (aligned to 4)

ton::int128 | ton::int256 - N bytes of data

ton::vector - 4 bytes of len, then len items

ton::vector - 4 bytes of len, then len items

ton::vector - 4 bytes of len, then len items

Implementors