mirror of
https://github.com/uuid-rs/uuid.git
synced 2025-09-29 22:10:50 +00:00
Added bytemuck support
This commit is contained in:
parent
50f70278de
commit
646dc1a82e
@ -71,6 +71,9 @@ fast-rng = ["rng", "rand"]
|
||||
sha1 = ["sha1_smol"]
|
||||
md5 = ["md-5"]
|
||||
|
||||
[dependencies]
|
||||
bytemuck = { version = "1.14.0", optional = true, features = ["derive"] }
|
||||
|
||||
# Public: Used in trait impls on `Uuid`
|
||||
[dependencies.serde]
|
||||
default-features = false
|
||||
|
@ -447,6 +447,10 @@ pub enum Variant {
|
||||
derive(borsh::BorshDeserialize, borsh::BorshSerialize)
|
||||
)]
|
||||
#[repr(transparent)]
|
||||
#[cfg_attr(
|
||||
feature = "bytemuck",
|
||||
derive(bytemuck::Zeroable, bytemuck::Pod, bytemuck::TransparentWrapper)
|
||||
)]
|
||||
pub struct Uuid(Bytes);
|
||||
|
||||
impl Uuid {
|
||||
|
Loading…
x
Reference in New Issue
Block a user