This crate implements a type that is a thin wrapper around uuids that can hold a "debug id". This is a concept that originally comes from breakpad and is also used by Sentry to identify a debug information file.
The reason this is not just a UUID is that at least on Windows a debug
information file (PDB) is not just associated by using a UUID alone
but it has an appendix (a
u32 age field).
The string representation must be between 33 and 40 characters long and consist of:
- 36 character hyphenated hex representation of the UUID field
- 1-16 character lowercase hex representation of the u64 appendix
use debugid::DebugId; let id: DebugId = "dfb8e43a-f242-3d73-a453-aeb6a777ef75-a".parse()?; assert_eq!("dfb8e43a-f242-3d73-a453-aeb6a777ef75-a".to_string(), id.to_string());
Separately the breakpad format can be generated as well:
use debugid::DebugId; let id: DebugId = "dfb8e43a-f242-3d73-a453-aeb6a777ef75-a".parse()?; assert_eq!(id.breakpad().to_string(), "DFB8E43AF2423D73A453AEB6A777EF75a");
Unique identifier for debug information files and their debug information.
Indicates a parsing error