[][src]Struct self_encryption::ChunkDetails

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]

pub fn new() -> ChunkDetails[src]

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<ChunkDetails> for ChunkDetails[src]

impl Clone for ChunkDetails[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Ord for ChunkDetails[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Default for ChunkDetails[src]

impl Eq for ChunkDetails[src]

impl PartialOrd<ChunkDetails> for ChunkDetails[src]

impl Debug for ChunkDetails[src]

impl Serialize for ChunkDetails[src]

impl<'de> Deserialize<'de> for ChunkDetails[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]