Struct self_encryption::ChunkDetails [−][src]
pub struct ChunkDetails { pub chunk_num: u32, pub hash: Vec<u8>, pub pre_hash: Vec<u8>, pub source_size: u64, }
Holds pre- and post-encryption hashes as well as the original (pre-compression) size for a given chunk.
Fields
chunk_num: u32
Index number (starts at 0)
hash: Vec<u8>
Post-encryption hash of chunk
pre_hash: Vec<u8>
Pre-encryption hash of chunk
source_size: u64
Size before encryption (compression alters this as well as any possible padding depending on cipher used)
Methods
impl ChunkDetails
[src]
impl ChunkDetails
pub fn new() -> ChunkDetails
[src]
pub fn new() -> ChunkDetails
Holds information 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.
Trait Implementations
impl PartialEq for ChunkDetails
[src]
impl PartialEq for ChunkDetails
fn eq(&self, other: &ChunkDetails) -> bool
[src]
fn eq(&self, other: &ChunkDetails) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ChunkDetails) -> bool
[src]
fn ne(&self, other: &ChunkDetails) -> bool
This method tests for !=
.
impl Eq for ChunkDetails
[src]
impl Eq for ChunkDetails
impl PartialOrd for ChunkDetails
[src]
impl PartialOrd for ChunkDetails
fn partial_cmp(&self, other: &ChunkDetails) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &ChunkDetails) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &ChunkDetails) -> bool
[src]
fn lt(&self, other: &ChunkDetails) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &ChunkDetails) -> bool
[src]
fn le(&self, other: &ChunkDetails) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &ChunkDetails) -> bool
[src]
fn gt(&self, other: &ChunkDetails) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &ChunkDetails) -> bool
[src]
fn ge(&self, other: &ChunkDetails) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for ChunkDetails
[src]
impl Ord for ChunkDetails
fn cmp(&self, other: &ChunkDetails) -> Ordering
[src]
fn cmp(&self, other: &ChunkDetails) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Clone for ChunkDetails
[src]
impl Clone for ChunkDetails
fn clone(&self) -> ChunkDetails
[src]
fn clone(&self) -> ChunkDetails
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for ChunkDetails
[src]
impl Default for ChunkDetails
fn default() -> ChunkDetails
[src]
fn default() -> ChunkDetails
Returns the "default value" for a type. Read more
impl Debug for ChunkDetails
[src]
impl Debug for ChunkDetails
Auto Trait Implementations
impl Send for ChunkDetails
impl Send for ChunkDetails
impl Sync for ChunkDetails
impl Sync for ChunkDetails