pub struct ChunkInfo {
pub index: usize,
pub dst_hash: XorName,
pub src_hash: XorName,
pub src_size: usize,
}Expand description
This is - in effect - a partial decryption key for an encrypted chunk of data.
It holds pre- and post-encryption hashes as well as the original (pre-compression) size for a given chunk. This information is required for successful recovery of a chunk, as well as for the encryption/decryption of it’s two immediate successors, modulo the number of chunks in the corresponding DataMap.
Fields§
§index: usizeIndex number (zero-based)
dst_hash: XorNamePost-encryption hash of chunk
src_hash: XorNamePre-encryption hash of chunk
src_size: usizeSize before encryption and compression (any possible padding depending on cipher used alters this)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChunkInfo
impl<'de> Deserialize<'de> for ChunkInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for ChunkInfo
impl Ord for ChunkInfo
Source§impl PartialOrd for ChunkInfo
impl PartialOrd for ChunkInfo
impl Eq for ChunkInfo
impl StructuralPartialEq for ChunkInfo
Auto Trait Implementations§
impl Freeze for ChunkInfo
impl RefUnwindSafe for ChunkInfo
impl Send for ChunkInfo
impl Sync for ChunkInfo
impl Unpin for ChunkInfo
impl UnwindSafe for ChunkInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more