A small crate designed to work with parition types and their GUIDs
Because I was working with partition types and their GUIDs and I noticed there wasn't a crate for that. So I made one.
- Add
System
andPartitionType
enums - Group GUID structs in lazy_statics
- Document everything (In progress)
- Standardize GUID struct names
This crate simply introduces two enums (System
& PartitionType
) and a struct (GUID
)
- The
System
enum contains variants that are named after the supported OS types, e.gWindows, Linux, FreeBSD, Apple, ChromeOS
- The
PartitionType
enum contains 127 variants of all documented partition type GUIDs following the format($SYSTEMNAME)($PARTITIONTYPE)Partition
for instanceLinuxRaidPartition
orCephDMCryptLUKSBlockWriteAhedLogPartition
- The
GUID
struct simply binds aSystem
and aPartitionType
variant together withDebug
andDisplay
implemented.
pub struct GUID {
string: &'static str,
system: Option<System>
}
that being said heres an example of printing out the EFI GUID struct.
extern crate guid_partition_types_rs;
use guid_partition_types_rs::{
GUID,
System,
GENERAL_PARTITION_TYPES
};
fn main() {
println!("{:?}", GENERAL_PARTITION_TYPES.get("EFI"));
}