Skip to main content

Crate frdt

Crate frdt 

Source
Expand description

frdt reads and edits Resonite .brson (FrDT) documents without turning them into JSON.

Editing keeps one decompressed BSON buffer and an index of slot offsets; summarize walks the Brotli stream once and keeps only counts and extracted dynamic variables. Unknown components and fields are copied as bytes, and non-finite doubles stay IEEE-754 values.

Structs§

AssetInfo
One entry of the root Asset array.
ComponentInfo
Type index, resolved name, and reference targets of one component.
CopiedComponent
What Document::copy_component added.
CopiedComponents
What Document::copy_components added.
Difference
One entry that differs. left is from the first document, right from the second; None means the entry is missing on that side.
Document
An open FrDT document. Mutations update this buffer in place.
DynamicVariable
A dynamic variable component, or a dynamic variable space.
Extract
The result of Document::extract.
Float3
Three IEEE-754 doubles, stored as a BSON document {x, y, z}.
FloatQ
Four IEEE-754 doubles, stored as a BSON document {x, y, z, w}.
Import
What Document::import copied.
ImportOptions
Options of Document::import_with. The default is what Document::import does.
SlotHandle
A slot inside a Document.
Summary
Counts and dynamic variables from a single pass.

Enums§

DynKind
DynValue
A scalar or small aggregate read from a Dynamic Variable field.
Error
Errors from opening, walking, or editing an FrDT document.
Mismatch
One root field on which the destination and an imported source disagree.
UnresolvedPolicy
What an import does with a reference from the copy to a source id that was not copied. Within one document such an id is still there, so nothing is unresolved.
Value
A slot field value that can be written without going through JSON.
VersionPolicy
How an import treats VersionNumber, FeatureFlags, and TypeVersions that differ from the destination’s.

Functions§

compare
Compare two documents by structure: slot tree, names, field values, component types and fields, and what each reference points at. Ids themselves do not take part, so a renumbered copy compares equal. Root VersionNumber, FeatureFlags, and TypeVersions, and the content of referenced assets, are compared too. See Difference.
compare_versions
Compare two VersionNumber strings part by part as numbers (2026.9.18.82 > 2026.9.8.100). A missing part counts as 0. A part that is not a number sorts after every number, and two such parts compare as text.
float3
Build a float3 slot value such as Scale.
floatq
Build a quaternion slot value such as Rotation.
summarize
Stream a .brson file and keep only counts, type names, and dynamic variables.
version_date
The leading year.month.day of a VersionNumber such as 2026.9.18.82.

Type Aliases§

Result