Struct dhcproto::encoder::Encoder [−][src]
pub struct Encoder<'a> { /* fields omitted */ }
Expand description
Encoder type, holds a mut ref to a buffer that it will write data to and an offset of the next position to write
Implementations
write bytes to buffer Return: number of bytes written
Write const number of bytes to buffer
write a u8
write a u16
write a u32
write a u128
write a u64
write a i32
Writes bytes to buffer and pads with 0 bytes up to some fill_len
Returns Err - if bytes.len() is greater then fill_len
Writes string to buffer and pads with 0 bytes up to some fill_len if String is None then write fill_len 0 bytes
Returns Err - if bytes.len() is greater then fill_len