Crate tarrasque [] [src]

A library for zero-allocation parsing of binary formats.

Macros

extract

Defines a struct with a corresponding [Extract] implementation.

Structs

Stream

A stream of bytes from which values can be extracted.

View

A slice of bytes containing values that span a fixed number of bytes.

ViewIter

An iterator over the values in a [View].

Enums

Endianness

A byte order.

ExtractError

An error encountered while extracting a value from a stream of bytes.

Traits

Extract

A type that can be extracted from a stream of bytes.

Span

A type that spans a fixed number of bytes.

Functions

be_f32

Returns the first four bytes in the supplied slice as a big-endian f32.

be_f64

Returns the first eight bytes in the supplied slice as a big-endian f64.

be_i16

Returns the first two bytes in the supplied slice as a big-endian i16.

be_i32

Returns the first four bytes in the supplied slice as a big-endian i32.

be_i64

Returns the first eight bytes in the supplied slice as a big-endian i64.

be_u16

Returns the first two bytes in the supplied slice as a big-endian u16.

be_u32

Returns the first four bytes in the supplied slice as a big-endian u32.

be_u64

Returns the first eight bytes in the supplied slice as a big-endian u64.

le_f32

Returns the first four bytes in the supplied slice as a little-endian f32.

le_f64

Returns the first eight bytes in the supplied slice as a little-endian f64.

le_i16

Returns the first two bytes in the supplied slice as a little-endian i16.

le_i32

Returns the first four bytes in the supplied slice as a little-endian i32.

le_i64

Returns the first eight bytes in the supplied slice as a little-endian i64.

le_u16

Returns the first two bytes in the supplied slice as a little-endian u16.

le_u32

Returns the first four bytes in the supplied slice as a little-endian u32.

le_u64

Returns the first eight bytes in the supplied slice as a little-endian u64.

Type Definitions

ExtractResult

The result of extracting a value from a stream of bytes.