pub struct MainHeader { /* private fields */ }
Expand description

The main header is the first Header, which can be found at the beginning of the first segment.
This header contains a lot of other headers (e.g. compression header, description header, …) and start information.

Implementations

returns a new main header with the given values.

returns the header identifier for the encrypted main header.

decodes the encrypted main header with the given password.

encodes the main header to a Vec<u8>. The encryption flag will be set to 2.

Error

The method returns an error, if the encryption header is missing (=None).

sets the length of the dumped data.

sets the hash header.

returns the chunk_size.

returns the segment size

returns the len() of the Vec<u8> (encoded main header).

returns the len() of the Vec<u8> (encoded encrypted main header).

Error

The method fails, if the encryption fails or no encryption header is present.

returns, if the chunks has a ed25519 signature or not.

sets the acquisition end timestamp of the inner description header.

returns a reference to the inner compression header

returns a reference to the inner encryption header (if available)

returns a reference to the inner description header

returns a reference to the inner hash header

returns the length of the content data

returns the unique identifier

sets the number of segments

returns the number of segments

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

the return value for decode_content(), decode_directly(), decode_for_key();

returns the identifier (=Magic bytes) of the header.

returns the version of the header.

encodes the header.

decodes the content of the header.

returns the size of the encoded header (in bytes)

encodes a given key.

encodes the (header) value/object directly (= without key).

encodes a key to the (header) value/object.

decodes the length of the header.

checks if the read identifier is valid for this header.

helper method to check, if the key is on position.

decodes the header directly.

decodes the header for the given key.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.