pub enum Packet {
    Call(RemoteCall),
    CallResponse(RemoteCallResponse),
    KeepAlive,
    Invalid,
    Message(String),
    Unsupported,
    Bad,
    Many(Vec<Packet, Global>),
    Translations(Vec<(String, Vec<String, Global>), Global>),
    Language(String),
}
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, Global>)

Many packets merged into one

§

Translations(Vec<(String, Vec<String, Global>), Global>)

Translation data dump

§

Language(String)

Request translations for language

Trait Implementations§

Write the object to the buffer, returning the amount of bytes written. If anything is wrong, false should be returned.
Dump data as base64-encoded. Useful for transmitting data as text.
Read the buffer, building the object and returning the amount of bytes read. If anything is wrong with the buffer, Err should be returned.
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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Should always be Self
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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more