Crate simple_parse[][src]

Structs

SpCtx

A context passed around SpRead and SpWrite functions

Enums

SpError

Possible errors when reading/writing

Traits

SpOptHints

Provides optimization hints used by SpRead traits.

SpRead

Parses Self from a source implementing Read (File,TcpStream, etc…)

SpReadRaw

Parses Self from a Cursor<&[u8]>

SpReadRawMut

Parses Self from a Cursor<&mut [u8]>

SpWrite

Writes T into a Writer (File,TcpStream, etc…)

Functions

read_at_offset

Consumes bytes until the specified offset is reached then calls T::from_reader

readall_at_offset

Consumes bytes until the specified offset is reached then calls T::from_reader with count set to Some(total_sz - offset)

validate_cursor

Consumes bytes from a Cursor<AsRef<[u8]>> returning a raw pointer to the validated bytes

validate_reader

Reads static_size bytes from src into dst

validate_reader_exact

Read the exact number of bytes required to fill buf. When reading an untrusted number of bytes, use validate_reader

write_at_offset

Writes null bytes into the writer until offset is reached

writeall_at_offset

Writes null bytes into the writer until offset is reached then calls T.to_writer() with count set to Some(usize::MAX)

Derive Macros

SpOptHints

Implements SpOptHints

SpRead

Implements SpRead and SpOptHints

SpReadRaw

Implements SpReadRaw

SpReadRawMut

Implements SpReadRawMut

SpWrite

Implements SpWrite