Struct self_encryption::ChunkInfo
source · [−]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: usize
Index number (zero-based)
dst_hash: XorName
Post-encryption hash of chunk
src_hash: XorName
Pre-encryption hash of chunk
src_size: usize
Size before encryption and compression (any possible padding depending on cipher used alters this)
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ChunkInfo
impl<'de> Deserialize<'de> for ChunkInfo
sourcefn 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
sourceimpl Ord for ChunkInfo
impl Ord for ChunkInfo
sourceimpl PartialOrd<ChunkInfo> for ChunkInfo
impl PartialOrd<ChunkInfo> for ChunkInfo
sourcefn partial_cmp(&self, other: &ChunkInfo) -> Option<Ordering>
fn partial_cmp(&self, other: &ChunkInfo) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for ChunkInfo
impl StructuralEq for ChunkInfo
impl StructuralPartialEq for ChunkInfo
Auto Trait Implementations
impl RefUnwindSafe for ChunkInfo
impl Send for ChunkInfo
impl Sync for ChunkInfo
impl Unpin for ChunkInfo
impl UnwindSafe for ChunkInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more