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 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 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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for RawTagOffset
impl Send for RawTagOffset
impl Sync for RawTagOffset
impl Unpin for RawTagOffset
impl UnwindSafe for RawTagOffset
Blanket Implementations
Mutably borrows from an owned value. Read more