pub trait UuidExt {
// Required methods
fn to_int_array(&self) -> [i32; 4];
fn from_int_array(arr: &[i32]) -> Option<Uuid>;
}Expand description
Extension trait for UUID to support Minecraft’s NBT int array format.
Required Methods§
Sourcefn to_int_array(&self) -> [i32; 4]
fn to_int_array(&self) -> [i32; 4]
Converts a UUID to an int array for NBT storage (vanilla format).
The UUID is split into 4 big-endian i32 values, matching
vanilla’s UUIDUtil.uuidToIntArray().
Sourcefn from_int_array(arr: &[i32]) -> Option<Uuid>
fn from_int_array(arr: &[i32]) -> Option<Uuid>
Parses a UUID from an int array (vanilla NBT format).
Returns None if the slice doesn’t have exactly 4 elements.
Matches vanilla’s UUIDUtil.uuidFromIntArray().
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".