pub struct Bools<VC = Vec<u64>, TC = [u64; 2]> {
pub values: VC,
pub tail: TC,
}Expand description
A store for maintaining Vec<bool>.
Packed bits are stored in values as complete u64 words. The tail
holds [last_word, last_bits]: the partial word being filled and the
count of valid bits in it. In the owned form tail is [u64; 2];
in the borrowed form it is &[u64] of length 2.
Fields§
§values: VCThe bundles of bits that form complete u64 values.
tail: TC[last_word, last_bits]: the partial word and the number of valid bits in it.
Trait Implementations§
Source§impl<VC: BorrowIndexAs<u64>> Borrow for Bools<VC>
impl<VC: BorrowIndexAs<u64>> Borrow for Bools<VC>
Source§type Borrowed<'a> = Bools<<VC as Borrow>::Borrowed<'a>, &'a [u64]>
where
VC: 'a
type Borrowed<'a> = Bools<<VC as Borrow>::Borrowed<'a>, &'a [u64]> where VC: 'a
The type of a borrowed container. Read more
Source§fn borrow<'a>(&'a self) -> Self::Borrowed<'a>
fn borrow<'a>(&'a self) -> Self::Borrowed<'a>
Converts a reference to the type to a borrowed variant. Read more
Source§fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>where
VC: 'a,
fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>where
VC: 'a,
Reborrows the borrowed type to a shorter lifetime. See
Columnar::reborrow for details.Source§fn reborrow_ref<'b, 'a: 'b>(thing: Self::Ref<'a>) -> Self::Ref<'b>where
Self: 'a,
fn reborrow_ref<'b, 'a: 'b>(thing: Self::Ref<'a>) -> Self::Ref<'b>where
Self: 'a,
Reborrows the borrowed type to a shorter lifetime. See
Columnar::reborrow for details.Source§impl<VC: PushIndexAs<u64>> Container for Bools<VC>
impl<VC: PushIndexAs<u64>> Container for Bools<VC>
fn reserve_for<'a, I>(&mut self, selves: I)
Source§fn with_capacity_for<'a, I>(selves: I) -> Self
fn with_capacity_for<'a, I>(selves: I) -> Self
Allocates an empty container that can be extended by
selves without reallocation. Read moreSource§impl<'a, VC: FromBytes<'a>> FromBytes<'a> for Bools<VC, &'a [u64]>
impl<'a, VC: FromBytes<'a>> FromBytes<'a> for Bools<VC, &'a [u64]>
Source§const SLICE_COUNT: usize
const SLICE_COUNT: usize
The number of byte slices this type consumes when reconstructed.
Source§fn from_bytes(bytes: &mut impl Iterator<Item = &'a [u8]>) -> Self
fn from_bytes(bytes: &mut impl Iterator<Item = &'a [u8]>) -> Self
Reconstructs
self from a sequence of correctly aligned and sized bytes slices. Read moreSource§fn from_store(store: &DecodedStore<'a>, offset: &mut usize) -> Self
fn from_store(store: &DecodedStore<'a>, offset: &mut usize) -> Self
Source§impl<VC: Len + IndexAs<u64>, TC: IndexAs<u64>> Index for &Bools<VC, TC>
impl<VC: Len + IndexAs<u64>, TC: IndexAs<u64>> Index for &Bools<VC, TC>
Source§impl<VC: Len + IndexAs<u64>, TC: IndexAs<u64>> Index for Bools<VC, TC>
impl<VC: Len + IndexAs<u64>, TC: IndexAs<u64>> Index for Bools<VC, TC>
impl<VC: Copy, TC: Copy> Copy for Bools<VC, TC>
impl<VC, TC> StructuralPartialEq for Bools<VC, TC>
Auto Trait Implementations§
impl<VC, TC> Freeze for Bools<VC, TC>
impl<VC, TC> RefUnwindSafe for Bools<VC, TC>where
VC: RefUnwindSafe,
TC: RefUnwindSafe,
impl<VC, TC> Send for Bools<VC, TC>
impl<VC, TC> Sync for Bools<VC, TC>
impl<VC, TC> Unpin for Bools<VC, TC>
impl<VC, TC> UnsafeUnpin for Bools<VC, TC>where
VC: UnsafeUnpin,
TC: UnsafeUnpin,
impl<VC, TC> UnwindSafe for Bools<VC, TC>where
VC: UnwindSafe,
TC: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more