Struct tox::toxcore::tcp::packet::Data[][src]

pub struct Data {
    pub connection_id: u8,
    pub data: Vec<u8>,
}

Sent by client to server. The client sends data with connection_id and the server relays it to the given connection

Serialized form:

Length Content
1 connection_id [ 0x10 .. 0xF0 )
variable Data

Fields

The id of the connection of the client

Data packet

Trait Implementations

impl Debug for Data
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Data
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for Data
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl FromBytes for Data
[src]

Deserialize struct using nom from raw bytes

impl ToBytes for Data
[src]

Serialize struct into raw bytes using cookie_factory

Auto Trait Implementations

impl Send for Data

impl Sync for Data