Struct packet_stream_codec::Metadata [] [src]

pub struct Metadata {
    pub flags: u8,
    pub id: PacketId,
}

The metadata of a packet.

Fields

Flags indicate the type of the data in the packet, whether the packet is a request, and wether it signals an end/error.

The id of the packet.

Methods

impl Metadata
[src]
[]

[src]
[]

Returns true if the stream flag of the packet is set.

[src]
[]

Returns true if the end/error flag of the packet is set.

[src]
[]

Returns true if the type flags signal a buffer.

[src]
[]

Returns true if the type flags signal a string.

[src]
[]

Returns true if the type flags signal json.

[src]
[]

Returns true if the type flags signal the unused type.

A CodecStream returns an error if it encounters a paket with this type, so this returns false for all Metadatas yielded from a CodecStream.

Trait Implementations

impl Debug for Metadata
[src]
[+]

[src]
[]

Formats the value using the given formatter. Read more

impl Copy for Metadata
[src]
[+]

impl Clone for Metadata
[src]
[+]

[src]
[]

Returns a copy of the value. Read more

1.0.0
[src]
[]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Metadata[+]

impl Sync for Metadata[+]