mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-15 10:25:40 +00:00
Feat/web (Patchset 4) (#460)
support basic functions in frontend 1. create/del network 2. inspect network running status
This commit is contained in:
@@ -7,13 +7,21 @@ include!(concat!(env!("OUT_DIR"), "/common.rs"));
|
||||
impl From<uuid::Uuid> for Uuid {
|
||||
fn from(uuid: uuid::Uuid) -> Self {
|
||||
let (high, low) = uuid.as_u64_pair();
|
||||
Uuid { low, high }
|
||||
Uuid {
|
||||
part1: (high >> 32) as u32,
|
||||
part2: (high & 0xFFFFFFFF) as u32,
|
||||
part3: (low >> 32) as u32,
|
||||
part4: (low & 0xFFFFFFFF) as u32,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Uuid> for uuid::Uuid {
|
||||
fn from(uuid: Uuid) -> Self {
|
||||
uuid::Uuid::from_u64_pair(uuid.high, uuid.low)
|
||||
uuid::Uuid::from_u64_pair(
|
||||
(u64::from(uuid.part1) << 32) | u64::from(uuid.part2),
|
||||
(u64::from(uuid.part3) << 32) | u64::from(uuid.part4),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user