pub enum Value {
Bool(bool),
Int(i64),
Int64(i64),
Double(f64),
String(String),
Array(Vec<Value>),
Binary(Vec<u8>),
Undefined,
Unknown {
type_id: u8,
data: Vec<u8>,
},
}Expand description
A decoded juce::var. One type shared by every reader and writer.
Variants§
Bool(bool)
Int(i64)
32-bit int (marker marker::INT); JUCE writes a fixed 4 bytes. Stored
widened to i64 so it can share an accessor with Value::Int64.
Int64(i64)
64-bit int (marker marker::INT64).
Double(f64)
Double (marker marker::DOUBLE), 8 bytes IEEE 754.
String(String)
String (marker marker::STRING). The trailing NUL is stripped on read
and re-added on write.
Array(Vec<Value>)
Array of values (marker marker::ARRAY).
Binary(Vec<u8>)
Binary blob (marker marker::BINARY).
Undefined
Void var (marker marker::UNDEFINED, or an empty length frame).
Unknown
Unparsed marker; raw payload preserved so the cursor stays aligned.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more