pub struct InitMask {
    blocks: Vec<u64>,
    len: Size,
Expand description

A bitmask where each bit refers to the byte with the same index. If the bit is true, the byte is initialized. If it is false the byte is uninitialized.


§blocks: Vec<u64>§len: Size


Checks whether the range is entirely initialized.

Returns Ok(()) if it’s initialized. Otherwise returns a range of byte indexes for the first contiguous span of the uninitialized access.

Returns the index of the first bit in start..end (end-exclusive) that is equal to is_init.

Returns an iterator, yielding a range of byte indexes for each contiguous region of initialized or uninitialized bytes inside the range start..end (end-exclusive).

The iterator guarantees the following:

  • Chunks are nonempty.
  • Chunks are adjacent (each range’s start is equal to the previous range’s end).
  • Chunks span exactly start..end (the first starts at start, the last ends at end).
  • Chunks alternate between InitChunk::Init and InitChunk::Uninit.

Transferring the initialization mask to other allocations.

Creates a run-length encoding of the initialization mask; panics if range is empty.

This is essentially a more space-efficient version of InitMask::range_as_init_chunks(...).collect::<Vec<_>>().

Applies multiple instances of the run-length encoding to the initialization mask.

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
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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
This method turns the parameters of a DepNodeConstructor into an opaque Fingerprint to be used in DepNode. Not all DepNodeParams support being turned into a Fingerprint (they don’t need to if the corresponding DepNode is anonymous).
This method tries to recover the query key from the given DepNode, something which is needed when forcing DepNodes during red-green evaluation. The query system will only call this method if fingerprint_style() is not FingerprintStyle::Opaque. It is always valid to return None here, in which case incremental compilation will treat the query as having changed instead of forcing it.

Returns the argument unchanged.

Calls U::from(self).

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

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.


Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes