Struct il2_iltags::tags::raw::RawTagOffset[][src]

pub struct RawTagOffset { /* fields omitted */ }
Expand description

This struct implements the raw tag offset information. It stores the information about a tag, such as its id and the location of its parts inside a sequence of bytes.

It does not store references to the original byte stream, just the information about a tags inside it.

Implementations

Creates a new RawTagOffset.

Returns the ID of the tag.

Retuns the offset of the tag.

Returns the total tag size.

Returns the offset of the tag’s value.

Returns the size of the tag’s value.

Returns the offset of the next tag.

Returns the initial offset of this tag’s value. It is usefull to create slices on the raw data.

Returns the end offset of the value. It is usefull to create slices on the raw data.

Returns the start offset of the tag. It is usefull to create slices on the raw data.

Returns the end offset of the tag.

Returns a slice within raw that points to the value of the tag pointed by this instance.

Arguments:

  • raw: The array that contains the tag indexe by this instance;

Returns a immutable slice within the raw that contains the value of the tag.

Returns a slice within raw that points to the value of the tag pointed by this instance.

Arguments:

  • raw: The array that contains the tag indexe by this instance;

Returns a immutable slice within the raw that contains the value of the tag.

Creates a new instance of this struct that maps the offsets to the same space of the parent. It assumes that this instance is contained by the parent (is within its value) and assumes 0 as the start of the parent’s value.

For example:

  • Parent’s value offset = 10;
  • This offset = 5;

The result will be a new instance that maps the beginning of this tag to 15. This allows the extraction of the tag directly from the byte sequence where the parent resides.

This method will perform only basic validations to ensure that this instace an indeed fit inside the parent but if those two instances are unrelated, the behavior of this method is undefined.

Arguments:

  • parent: The parent of this instance;

Returns a new instance of Self that points to the same tag value but relative to the offset space of the parent.

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

Returns the “default value” for a type. Read more

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

Performs the conversion.

Performs the conversion.

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)

recently added

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.