Skip to main content

write_glb_bytes

Function write_glb_bytes 

Source
pub fn write_glb_bytes(
    doc: &Document,
    policy: GlbProjectionPolicyV1,
    receipt: &GlbWritePreflight,
) -> Result<Vec<u8>, WriteError>
Expand description

Construct an in-memory GLB from an exact preflight receipt.

This reruns the same projection in retaining mode and refuses a changed document or limit set before allocating the complete GLB vector.

ยงErrors

Returns WriteError::ReceiptMismatch when the document no longer has the approved exact projection, or WriteError::Allocation when the checked output vector cannot reserve its exact total capacity.