pub fn cast<U>(self) -> BitPtr<M, U, O>
	where U: BitStore {
		let (addr, head, _) =
			unsafe { self.span_unchecked(1) }.cast::<U>().raw_parts();
		unsafe { BitPtr::new_unchecked(addr, head) }
	}
/// Casts to a `BitPtr` with a different storage parameter.
///
/// This is not free! In order to maintain value integrity, it encodes a
/// `BitSpan` encoded descriptor with its value, casts that, then decodes
/// into a `BitPtr` of the target type. If `T` and `U` have different
/// `::Mem` associated types, then this may change the selected bit in
/// memory. This is an unavoidable cost of the addressing and encoding
/// schemes.
///
/// ## Original
///
/// [`pointer::cast`](https://doc.rust-lang.org/std/primitive.pointer.html#method.cast)
Casts to a `BitPtr` with a different storage parameter.
This is not free. In order to maintain value integrity, it encodes a
`BitSpan` encoded descriptor with its value, casts that, then decodes
into a `BitPtr` of the target type.
Casts to a ` BitPtr ` with a different storage parameter . This is not free . In order to maintain value integrity it encodes a ` BitSpan ` encoded descriptor with its value casts that then decodes into a ` BitPtr ` of the target type .
pub fn cast<U>(self) -> BitPtr<M, U, O>
	where U: BitStore {
		let (addr, head, _) =
			unsafe { self.span_unchecked(1) }.cast::<U>().raw_parts();
		unsafe { BitPtr::new_unchecked(addr, head) }
	}
pub fn cast < U > ( self ) -> BitPtr < M , U , O > where U : BitStore { let ( addr , head , _ ) = unsafe { self . span_unchecked ( 1 ) } . cast :: < U > ( ) . raw_parts ( ) ; unsafe { BitPtr :: new_unchecked ( addr , head ) } }
Casts to a `BitPtr` with a different storage parameter.
Casts to a ` BitPtr ` with a different storage parameter .
self
self
original
None