fn write_bit<O>(&self, index: BitIdx<Self::Item>, value: bool) -> bool
	where O: BitOrder {
		let select = index.select::<O>().into_inner();
		select
			& if value {
				self.fetch_or(select, Ordering::Relaxed)
			}
			else {
				self.fetch_and(!select, Ordering::Relaxed)
			} != <Self::Item>::ZERO
	}
/// Writes a value to one bit in a memory element, returning the previous
/// value.
///
/// ## Type Parameters
///
/// - `O`: An ordering of bits in a memory element that translates the
///   `index` into a real position.
///
/// ## Parameters
///
/// - `index`: The semantic index of the bit in `*self` to modify.
/// - `value`: The new bit value to write into `*self` at the `index`.
///
/// ## Returns
///
/// The bit previously stored in `*self` at `index`. These operations are
/// required to load the `*self` value from memory in order to operate, and
/// so always have the prior value available for use. This can reduce
/// spurious loads throughout the crate.
///
/// ## Effects
///
/// `*self` is updated with the bit at `index` set to `value`; all other
/// bits remain unchanged.
Writes a value to one bit in a memory element, returning the previous
value.
Writes a value to one bit in a memory element returning the previous value .
fn write_bit<O>(&self, index: BitIdx<Self::Item>, value: bool) -> bool
	where O: BitOrder {
		let select = index.select::<O>().into_inner();
		select
			& if value {
				self.fetch_or(select, Ordering::Relaxed)
			}
			else {
				self.fetch_and(!select, Ordering::Relaxed)
			} != <Self::Item>::ZERO
	}
fn write_bit < O > ( & self , index : BitIdx < Self :: Item > , value : bool ) -> bool where O : BitOrder { let select = index . select :: < O > ( ) . into_inner ( ) ; select & if value { self . fetch_or ( select , Ordering :: Relaxed ) } else { self . fetch_and ( ! select , Ordering :: Relaxed ) } != < Self :: Item > :: ZERO }
Writes a value to one bit in a memory element, returning the previous
value.
Writes a value to one bit in a memory element returning the previous value .
&self
index
BitIdx<Self::Item>
value
bool
The bit previously stored in `*self` at `index`. These operations are
required to load the `*self` value from memory in order to operate, and
so always have the prior value available for use. This can reduce
spurious loads throughout the crate.
The bit previously stored in ` * self ` at ` index ` . These operations are required to load the ` * self ` value from memory in order to operate and so always have the prior value available for use . This can reduce spurious loads throughout the crate .
&self
index
BitIdx<Self::Item>
The semantic index of the bit in `*self` to modify.
The semantic index of the bit in ` * self ` to modify .
value
bool
The new bit value to write into `*self` at the `index`.
The new bit value to write into ` * self ` at the ` index ` .
O
An ordering of bits in a memory element that translates the
`index` into a real position.
An ordering of bits in a memory element that translates the ` index ` into a real position .
effects
`*self` is updated with the bit at `index` set to `value`; all other
bits remain unchanged.
` * self ` is updated with the bit at ` index ` set to ` value ` ; all other bits remain unchanged .