pub(crate) fn span(self, len: usize) -> (usize, Self) {
		if len == 0 {
			return (0, self);
		}

		let head = self.end & R::MASK;
		let bits_in_head = (bits_of::<R>() as u8 - head) as usize;

		if len <= bits_in_head {
			return (1, unsafe { Self::new_unchecked(head + len as u8) });
		}

		let bits_after_head = len - bits_in_head;
		let elts = bits_after_head >> R::INDX;
		let tail = bits_after_head as u8 & R::MASK;

		let is_zero = (tail == 0) as u8;
		let edges = 2 - is_zero as usize;
		(elts + edges, unsafe {
			Self::new_unchecked((is_zero << R::INDX) | tail)
		})
	}
/// Computes the span information for a region.
///
/// The computed span of `len` bits begins at `self` and extends upwards in
/// memory. The return value is the number of memory elements that contain
/// bits of the span, and the first dead bit after the span.
///
/// ## Parameters
///
/// - `self`: A dead bit which is used as the first live bit of the new
///   span.
/// - `len`: The number of live bits in the span starting at `self`.
///
/// ## Returns
///
/// - `.0`: The number of `R` elements that contain live bits in the
///   computed span.
/// - `.1`: The dead-bit tail index ending the computed span.
///
/// ## Behavior
///
/// If `len` is `0`, this returns `(0, self)`, as the span has no live bits.
/// If `self` is [`BitEnd::MAX`], then the new region starts at
/// [`BitIdx::MIN`] in the next element.
///
/// [`BitEnd::MAX`]: Self::MAX
/// [`BitIdx::MIN`]: Self::MIN
Computes the span information for a region.
The computed span of `len` bits begins at `self` and extends upwards in
memory. The return value is the number of memory elements that contain
bits of the span, and the first dead bit after the span.
Computes the span information for a region . The computed span of ` len ` bits begins at ` self ` and extends upwards in memory . The return value is the number of memory elements that contain bits of the span and the first dead bit after the span .
pub(crate) fn span(self, len: usize) -> (usize, Self) {
		if len == 0 {
			return (0, self);
		}
		let head = self.end & R::MASK;
		let bits_in_head = (bits_of::<R>() as u8 - head) as usize;
		if len <= bits_in_head {
			return (1, unsafe { Self::new_unchecked(head + len as u8) });
		}
		let bits_after_head = len - bits_in_head;
		let elts = bits_after_head >> R::INDX;
		let tail = bits_after_head as u8 & R::MASK;
		let is_zero = (tail == 0) as u8;
		let edges = 2 - is_zero as usize;
		(elts + edges, unsafe {
			Self::new_unchecked((is_zero << R::INDX) | tail)
		})
	}
pub ( crate ) fn span ( self , len : usize ) -> ( usize , Self ) { if len == 0 { return ( 0 , self ) ; } let head = self . end & R :: MASK ; let bits_in_head = ( bits_of :: < R > ( ) as u8 - head ) as usize ; if len <= bits_in_head { return ( 1 , unsafe { Self :: new_unchecked ( head + len as u8 ) } ) ; } let bits_after_head = len - bits_in_head ; let elts = bits_after_head >> R :: INDX ; let tail = bits_after_head as u8 & R :: MASK ; let is_zero = ( tail == 0 ) as u8 ; let edges = 2 - is_zero as usize ; ( elts + edges , unsafe { Self :: new_unchecked ( ( is_zero << R :: INDX ) | tail ) } ) }
Computes the span information for a region.
Computes the span information for a region .
self
len
usize
: The number of `R` elements that contain live bits in the
computed span.
: The number of ` R ` elements that contain live bits in the computed span .
: The dead-bit tail index ending the computed span.
: The dead - bit tail index ending the computed span .
self
A dead bit which is used as the first live bit of the new
span.
A dead bit which is used as the first live bit of the new span .
len
usize
The number of live bits in the span starting at `self`.
The number of live bits in the span starting at ` self ` .
behavior
If `len` is `0`, this returns `(0, self)`, as the span has no live bits.
If `self` is [`BitEnd::MAX`], then the new region starts at
[`BitIdx::MIN`] in the next element.


If ` len ` is ` 0 ` this returns ` ( 0 self ) ` as the span has no live bits . If ` self ` is [ ` BitEnd :: MAX ` ] then the new region starts at [ ` BitIdx :: MIN ` ] in the next element .