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
use binrw::binread;
use fourcc_rs::FourCC;
use resource_fork::Resource;

#[binread]
#[derive(Debug, Resource)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[resource(code = "FREF")]
#[br(big)]
pub struct FileRef {
    pub code: FourCC,
    pub local: u16,
    #[br(map(macintosh_utils::string))]
    pub file_name: String,
}