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

The segment header contains all informations about the specific segment. Each segment has his own segment header.
This header is not a part of the main header.\

Implementations

returns a new empty segment header

returns a new segment header with the given values.

returns the unique identifier of image (each segment should have the same identifier).

returns the segment number.

returns the length of the segment in bytes.

overwrites the length value in the header with the given value. This can be useful, if you create an ‘empty’ header (with length=0) and want to set the length value after reading the data from source to buffer.

sets the segment number to the next number. This can be useful, for example, if you clone a segment header from the previous one or something like that.

sets the offset of the segment footer.

returns the footer offset.

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.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

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

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.