pub enum Packet {
    Call(RemoteCall),
    CallResponse(RemoteCallResponse),
    KeepAlive,
    Invalid,
    Message(String),
    Unsupported,
    Bad,
    Many(Vec<Packet>),
}
Expand description

Accepted Packet types and the data they contain

Variants

Call(RemoteCall)

A remote call

CallResponse(RemoteCallResponse)

A reponse to a remote call

KeepAlive

Unused

Invalid

Invalid

Message(String)

General message

Unsupported

Response to an unsupported packet

Bad

Broken packet type, useful for testing

Many(Vec<Packet>)

Many packets merged into one

Trait Implementations

Write the object to the buffer, returning the amount of bytes written. If anything is wrong, false should be returned. Read more

Dump data as base64-encoded. Useful for transmitting data as text. Read more

Read the buffer, building the object and returning the amount of bytes read. If anything is wrong with the buffer, Err should be returned. Read more

Load data from a base64-encoded buffer

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.