Struct dhcproto::decoder::Decoder[][src]

pub struct Decoder<'a> { /* fields omitted */ }
Expand description

Decoder type. Wraps a buffer which only contains bytes that have not been read yet

Implementations

Create a new Decoder

read a u8

read a u32

read a i32

read a u16

read a u64

read a N bytes into slice

read a MAX length bytes into nul terminated CString

read MAX length bytes and read into utf-8 encoded String

read a slice of bytes determined at runtime

Read a utf-8 encoded String

Read an ipv4 addr

Read a list of ipv4 addrs

Read a list of ipv6 addrs

Read a list of ipv4 pairs

Read a bool

return slice of buffer start at index of unread data

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 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.