Crate bebop

Source

Modules§

alignment
error
fixed_sized
prelude
testing

Macros§

bitflags
The macro used to generate the flag structures.
collection
Macro to define collections easily. Very useful when testing. Copied from https://stackoverflow.com/a/27582993/4404257
const_assert_align
Ensure the alignment of a type is a certain value at compile time.
const_assert_impl
Assert that a type or value implements a given list of traits at compile time.
define_serialize_chained
Serialize values from a packed type. Use fn _serialize_chained to generate a chain serialization function for use within SubRecord, or just pass the type, value, and field to chain serialize a given value.
packed_read
The type must be Copy. Creates an aligned copy of a field on the stack for easy reading.
test_serialization
Macro to make writing tests easier since most of them follow the same pattern
unaligned_do
Reads a possibly unaligned pointer as a value and passes it to a closure.
unaligned_read
The type must be Copy. Creates an aligned copy of a field on the stack for easy reading.
unaligned_ref_read
Reads a possibly unaligned pointer as a reference.

Structs§

Date
A date is stored as a 64-bit integer amount of “ticks” since 00:00:00 UTC on January 1 of year 1 A.D. in the Gregorian calendar, where a “tick” is 100 nanoseconds.
Guid
A GUID is a unique identifier. Stored internally in the Microsoft Guid format to support zero-copy deserialization

Enums§

DeserializeError
SerializeError
SliceWrapper
This allows us to either wrap an existing &[T] slice to serialize it OR to store a raw byte slice from an encoding and access its potentially unaligned values.

Constants§

ENUM_SIZE
Size of an enum
LEN_SIZE
Size of length data

Traits§

FixedSized
A trait which should be given to any type which will always take up the same amount of space when serialized. This goes one step beyond the Sized trait which only requires it to take up a set amount of space on the stack. This is saying that the total data it contains and points to must always be of the exact same size for every instance.
OwnedRecord
OwnedSubRecord
Record
Bebop message type which can be serialized and deserialized.
SubRecord
Internal trait used to reduce the amount of code that needs to be generated.
SubRecordHashMapKey

Functions§

read_len
Read a 4-byte length value from the front of the raw data.
write_len
Write a 4-byte length value to the writer.

Type Aliases§

DeResult
Len
SeResult