proxmox-protocol/src/protocol.rs: derive Endian for DynamicChunk

This commit is contained in:
Dietmar Maurer 2019-04-24 06:51:54 +02:00
parent ae694f44ef
commit 796f8fc046

View File

@ -155,6 +155,7 @@ pub mod backup_type {
}
#[repr(C, packed)]
#[derive(Endian)]
pub struct DynamicChunk {
pub offset: u64,
pub digest: [u8; 32],
@ -229,21 +230,6 @@ pub mod client {
}
}
impl Endian for DynamicChunk {
fn to_be(self) -> Self {
self
}
fn to_le(self) -> Self {
self
}
fn from_be(self) -> Self {
self
}
fn from_le(self) -> Self {
self
}
}
pub struct PacketBuilder {
data: Vec<u8>,
}