pub fn new(
		ptr: Address<M, T>,
		bit: BitIdx<T::Mem>,
	) -> Result<Self, MisalignError<T>> {
		Ok(Self {
			ptr: check_alignment(ptr)?,
			bit,
			..Self::DANGLING
		})
	}
/// Tries to construct a `BitPtr` from a memory location and a bit index.
///
/// ## Parameters
///
/// - `ptr`: The address of a memory element. `Address` wraps raw pointers
///   or references, and enforces that they are not null. `BitPtr`
///   additionally requires that the address be well-aligned to its type;
///   misaligned addresses cause this to return an error.
/// - `bit`: The index of the selected bit within `*ptr`.
///
/// ## Returns
///
/// This returns an error if `ptr` is not aligned to `T`; otherwise, it
/// returns a new bit-pointer structure to the given element and bit.
///
/// You should typically prefer to use constructors that take directly from
/// a memory reference or pointer, such as the `TryFrom<*T>`
/// implementations, the `From<&/mut T>` implementations, or the
/// [`::from_ref()`], [`::from_mut()`], [`::from_slice()`], or
/// [`::from_slice_mut()`] functions.
///
/// [`::from_mut()`]: Self::from_mut
/// [`::from_ref()`]: Self::from_ref
/// [`::from_slice()`]: Self::from_slice
/// [`::from_slice_mut()`]: Self::from_slice_mut
Tries to construct a `BitPtr` from a memory location and a bit index.
Tries to construct a ` BitPtr ` from a memory location and a bit index .
pub fn new(
		ptr: Address<M, T>,
		bit: BitIdx<T::Mem>,
	) -> Result<Self, MisalignError<T>> {
		Ok(Self {
			ptr: check_alignment(ptr)?,
			bit,
			..Self::DANGLING
		})
	}
pub fn new ( ptr : Address < M , T > , bit : BitIdx < T :: Mem > , ) -> Result < Self , MisalignError < T > > { Ok ( Self { ptr : check_alignment ( ptr ) ? , bit , .. Self :: DANGLING } ) }
Tries to construct a `BitPtr` from a memory location and a bit index.
Tries to construct a ` BitPtr ` from a memory location and a bit index .
ptr
Address<M, T>
bit
BitIdx<T::Mem>
This returns an error if `ptr` is not aligned to `T`; otherwise, it
returns a new bit-pointer structure to the given element and bit.

You should typically prefer to use constructors that take directly from
a memory reference or pointer, such as the `TryFrom<*T>`
implementations, the `From<&/mut T>` implementations, or the
[`::from_ref()`], [`::from_mut()`], [`::from_slice()`], or
[`::from_slice_mut()`] functions.


This returns an error if ` ptr ` is not aligned to ` T ` ; otherwise it returns a new bit - pointer structure to the given element and bit . You should typically prefer to use constructors that take directly from a memory reference or pointer such as the ` TryFrom< * T > ` implementations the ` From<& / mut T > ` implementations or the [ ` :: from_ref () ` ] [ ` :: from_mut () ` ] [ ` :: from_slice () ` ] or [ ` :: from_slice_mut () ` ] functions .
ptr
Address<M, T>
The address of a memory element. `Address` wraps raw pointers
or references, and enforces that they are not null. `BitPtr`
additionally requires that the address be well-aligned to its type;
misaligned addresses cause this to return an error.
The address of a memory element . ` Address ` wraps raw pointers or references and enforces that they are not null . ` BitPtr ` additionally requires that the address be well - aligned to its type ; misaligned addresses cause this to return an error .
bit
BitIdx<T::Mem>
The index of the selected bit within `*ptr`.
The index of the selected bit within ` * ptr ` .