pub enum Type {
Utf8String,
EmbeddedData,
Object,
SignedInt,
UnsignedInt,
Float,
Double,
String(String),
Array(usize),
Unknown(u8),
}Expand description
Represents primitive types of data that can be stored in a typedstream
These type encodings are partially documented here by Apple.
Variants§
Utf8String
Encoded string data, usually embedded in an object. Denoted by:
| Hex | UTF-8 |
|---|---|
0x28 | + |
EmbeddedData
Encoded bytes that can be parsed again as data. Denoted by:
| Hex | UTF-8 |
|---|---|
0x2A | * |
Object
An instance of a class, usually with data. Denoted by:
| Hex | UTF-8 |
|---|---|
0x40 | @ |
SignedInt
An i8, i16, or i32. Denoted by:
The width is determined by the prefix: i8 has none, i16 has 0x81, and i32 has 0x82.
UnsignedInt
A u8, u16, or u32. Denoted by:
The width is determined by the prefix: u8 has none, u16 has 0x81, and u32 has 0x82.
Float
Double
String(String)
Some text we can reuse later, i.e. a class name.
Array(usize)
An array containing some data of a given length. Denoted by braced digits: [123].
Unknown(u8)
Data for which we do not know the type, likely for something this parser does not implement.