Struct rustc_middle::mir::interpret::allocation::InitMask [−][src]
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.
Fields
blocks: Vec<u64>len: SizeImplementations
impl InitMask[src]
impl InitMask[src]pub const BLOCK_SIZE: u64[src]
pub fn new(size: Size, state: bool) -> Self[src]
pub fn is_range_initialized(
&self,
start: Size,
end: Size
) -> Result<(), Range<Size>>[src]
pub fn is_range_initialized(
&self,
start: Size,
end: Size
) -> Result<(), Range<Size>>[src]Checks whether the range start..end (end-exclusive) 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.
pub fn set_range(&mut self, start: Size, end: Size, new_state: bool)[src]
pub fn set_range_inbounds(&mut self, start: Size, end: Size, new_state: bool)[src]
pub fn get(&self, i: Size) -> bool[src]
pub fn set(&mut self, i: Size, new_state: bool)[src]
fn set_bit(&mut self, block: usize, bit: usize, new_state: bool)[src]
pub fn grow(&mut self, amount: Size, new_state: bool)[src]
Trait Implementations
impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for InitMask[src]
impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for InitMask[src]fn hash_stable(
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)[src]
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)
impl Ord for InitMask[src]
impl Ord for InitMask[src]impl PartialOrd<InitMask> for InitMask[src]
impl PartialOrd<InitMask> for InitMask[src]fn partial_cmp(&self, other: &InitMask) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &InitMask) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Eq for InitMask[src]
impl StructuralEq for InitMask[src]
impl StructuralPartialEq for InitMask[src]
Auto Trait Implementations
impl RefUnwindSafe for InitMask
impl Send for InitMask
impl Sync for InitMask
impl Unpin for InitMask
impl UnwindSafe for InitMask
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> MaybeResult<T> for T[src]
impl<T> MaybeResult<T> for T[src]impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]fn with_constness(self, constness: Constness) -> ConstnessAnd<Self>[src]
fn with_const(self) -> ConstnessAnd<Self>[src]
fn without_const(self) -> ConstnessAnd<Self>[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,