pub struct ShardHeader {
pub file_uuid: [u8; 16],
pub shard_index: u32,
pub shard_total: u32,
pub data_offset: u64,
pub data_len: u64,
pub crc32: u32,
pub redundant_header_len: u32,
}Expand description
分片头(56 字节)。
Fields§
§file_uuid: [u8; 16]与主文件一致,用于归属判定。
shard_index: u32本片序号,从 0 开始。
shard_total: u32总片数。
data_offset: u64本片数据在原密文中的偏移。
data_len: u64本片数据长度。
crc32: u32本片数据的 CRC-32(IEEE)。
redundant_header_len: u32冗余主 header 长度,0 表示无。
Implementations§
Trait Implementations§
Source§impl Clone for ShardHeader
impl Clone for ShardHeader
Source§impl Debug for ShardHeader
impl Debug for ShardHeader
impl Eq for ShardHeader
Source§impl PartialEq for ShardHeader
impl PartialEq for ShardHeader
impl StructuralPartialEq for ShardHeader
Auto Trait Implementations§
impl Forget for ShardHeader
impl Freeze for ShardHeader
impl RefUnwindSafe for ShardHeader
impl Send for ShardHeader
impl Sync for ShardHeader
impl Unpin for ShardHeader
impl UnsafeUnpin for ShardHeader
impl UnwindSafe for ShardHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more