Struct packet_stream::DecodedPacket
[−]
[src]
pub struct DecodedPacket { /* fields omitted */ }
A packet decoded an AsyncRead.
Methods
impl DecodedPacket
[src]
fn is_stream_packet(&self) -> bool
[src]
Returns true if the stream flag of the packet is set.
fn is_end_packet(&self) -> bool
[src]
Returns true if the end flag of the packet is set.
fn is_buffer_packet(&self) -> bool
[src]
Returns true if the type flags signal a buffer.
fn is_string_packet(&self) -> bool
[src]
Returns true if the type flags signal a string.
fn is_json_packet(&self) -> bool
[src]
Returns true if the type flags signal json.
fn id(&self) -> i32
[src]
Returns the id of the packet.
fn data(&self) -> &Box<[u8]>
[src]
Returns a reference to the packet's data.
fn data_mut(&mut self) -> &mut Box<[u8]>
[src]
Returns a mutable reference to the packet's data.
fn into_data(self) -> Box<[u8]>
[src]
Consumes the packet and gives ownership of its data.