Skip to main content

Crate flatr

Crate flatr 

Source

Modules§

prelude

Structs§

BitMask
BitMaskIter
The zero-overhead state machine for BitMask iteration.
BitMaskZerosIter
BuildVTableHasher
BuildHasher that produces VTableHasher instances.
DefaultBuffer
The standard Buffer implementation.
FileBlob
FileBlobView
Gif
Jpeg
Json
ListView
A zero-copy, double-ended iterator and random-access view over an array stored in a flatbuffer.
Pdf
Png
RawView
Low-level, type-erased view of a single table object.
VTableHasher
FNV-1a hasher used exclusively for the vtable deduplication map.
WebP

Enums§

DataType
VerifyError

Constants§

MAX_DEPTH

Traits§

Buffer
Abstraction over a backward-growing byte buffer used during serialization and merging.
FileKind
Flat
HasRawView
Implemented by every generated XxxView<'a> type.
Query
QueryType
ReadAt
Decode a value of type Self from a byte buffer at a given absolute offset.
RegistryView
Row
Serialize
Trait for values that can be written into a Buffer.
SerializeBytes
Trait for writing raw byte sequences without the inline/offset distinction.
Table
Verify

Functions§

bitmax
check_bounds
merge_file_list
Merge a List(FileBlob) field — identical wire format to List(String): each element is a forward-offset pointer to [len: u32][bytes...]. Reuses the same two-pass block-copy strategy as merge_string_list.
merge_inline_list
Merge a List(Inline) field — packed scalar or #[repr(C)] struct arrays.
merge_string_list
Merge a List(String) field using two-pass block copying.
merge_table_list
Merge a List(Table) field using three-pass block copying.
merge_union_list
Merge a List(Union) field across multiple views.
read_root
Read the root offset from the first 4 bytes of a finished flatbuffer.
verify_file_array
verify_file_field
verify_root
Verify a finished buffer and return the unique vtable positions found.
verify_scalar_array
verify_string_array
verify_string_field
verify_table_array
out receives one position per table element — duplicates are expected when elements share a vtable (the common case) and are deduplicated later.
verify_table_field
verify_table_header
verify_vtable_field
write_union_slot
Write a 5-byte union slot: a 4-byte forward offset followed by a 1-byte discriminant tag.

Type Aliases§

VerifyResult
Unit on success — vtable positions are accumulated into the caller-supplied out: &mut Vec<usize> so the entire traversal shares one allocation.

Derive Macros§

Flat
FlatUnion
Row
Table