Skip to main content

Module juce_var

Module juce_var 

Source
Expand description

JUCE var binary value encoding and decoding.

Values exchanged with RØDECaster devices are serialized using the JUCE var::writeToStream format. Each value consists of a compressed integer length, a marker byte indicating the variant type, and the raw payload.

This module provides the Value enum to represent these types in Rust alongside functions to read and write them on binary streams.

Modules§

marker
juce::var VariantStreamMarkers: the byte after a value’s length frame.

Structs§

Reader
A position-tracking reader over a byte slice: the shared cursor for the juce::var decode (the full ValueTree walk in crate::valuetree).

Enums§

Value
A decoded juce::var. One type shared by every reader and writer.

Functions§

read_compressed_int
Read a JUCE writeCompressedInt: one size byte (low 7 bits = value byte count, capped at 4; high bit = sign) then that many little-endian bytes.
read_cstring
Read a NUL-terminated UTF-8 string (juce::OutputStream::writeString).
read_value
Read a single juce::var (var::readFromStream).
write_compressed_int
Write a JUCE writeCompressedInt (the inverse of read_compressed_int).