Enum bitsock::Packet[][src]

pub enum Packet {
Show 14 variants Invalid, Bytes(Vec<u8>), String(String), I8(i8), I16(i16), I32(i32), I64(i64), F32(f32), F64(f64), U8(u8), U16(u16), U32(u32), U64(u64), Identified(u32Vec<u8>),
}
Expand description

Enum containing all the possible packet types.

Variants

Invalid

Bytes(Vec<u8>)

Tuple Fields

0: Vec<u8>

String(String)

Tuple Fields

0: String

Packet containing a String.

I8(i8)

Tuple Fields

0: i8

Packet containing a i8.

I16(i16)

Tuple Fields

0: i16

Packet containing a i16.

I32(i32)

Tuple Fields

0: i32

Packet containing a i32.

I64(i64)

Tuple Fields

0: i64

Packet containing a i64.

F32(f32)

Tuple Fields

0: f32

Packet containing a f32.

F64(f64)

Tuple Fields

0: f64

Packet containing a f64.

U8(u8)

Tuple Fields

0: u8

Packet containing a u8.

U16(u16)

Tuple Fields

0: u16

Packet containing a u16.

U32(u32)

Tuple Fields

0: u32

Packet containing a u32.

U64(u64)

Tuple Fields

0: u64

Packet containing a u64.

Identified(u32Vec<u8>)

Tuple Fields

0: u32
1: Vec<u8>

Implementations

Encode the packet into bytes.

Returns a Packet from a Vec of bytes.

Trait Implementations

Formats the value using the given formatter. Read more

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

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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.