resource-fork-types 0.1.0

Support for reading common resource fork types in rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use binrw::BinRead;
use resource_fork::Resource;

#[derive(Resource, BinRead, Debug)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[resource(code = "vers")]
#[br(big)]
pub struct Version {
    pub major: u8,
    pub minor: u8,
    pub development_stage: u8,
    pub prerelease_version_level: u8,
    pub region_code: u16,
    #[br(map(macintosh_utils::string))]
    pub version_number: String,
    #[br(map(macintosh_utils::string))]
    pub version_message: String,
}