pub enum DiskImage<'a> {
STX(STXDisk<'a>),
Apple(AppleDisk<'a>),
}Expand description
DiskImage is the primary enumeration for holding disk images.
The DiskImageParser and DiskImageSaver trait functions return and operate on this enumeration.
Because the Disk data structures are more intelligent than simple byte-oriented C structures, copying them isn’t as easy as copying a block of bytes. rust-clippy recommends boxing the large fields to reduce the total size of the enum. This is a new recommendation, we’ll ignore it for now and investigate other solution. DiskImage construction is usually done once at the beginning of the program, and total variant size is still around ~512 bytes On normal invocations in the current codebase we only have one instance of this enum. Future versions may have more, but for now the cost is not an issue. If this code is adapted to process a large number of images and thrashing is a concern, feel free to fix it.
Variants§
STX(STXDisk<'a>)
An Atari ST STX Disk Image. Usually the raw data in a STX disk image is a FAT12 filesystem.
Apple(AppleDisk<'a>)
An Apple ][ Disk Image There are several different encodings, formats, and filesystems for Apple2 disks. This includes nibble encoding and DOS 3.x and ProDOS filesystems.