pub struct Repeats<TC, CC = Vec<u64>, VC = Vec<u64>, WC = [u64; 2]> {
pub inner: Options<TC, CC, VC, WC>,
}Expand description
A container that encodes repeated values with a None variant, at the cost of extra bits for every record.
Fields§
§inner: Options<TC, CC, VC, WC>Some(x) encodes a value, and None indicates the prior x value.
Trait Implementations§
Source§impl<'a, TC: AsBytes<'a>, CC: AsBytes<'a>, VC: AsBytes<'a>> AsBytes<'a> for Repeats<TC, CC, VC, &'a [u64]>
impl<'a, TC: AsBytes<'a>, CC: AsBytes<'a>, VC: AsBytes<'a>> AsBytes<'a> for Repeats<TC, CC, VC, &'a [u64]>
Source§impl<TC: Borrow> Borrow for Repeats<TC>
impl<TC: Borrow> Borrow for Repeats<TC>
Source§type Ref<'a> = <TC as Borrow>::Ref<'a>
where
TC: 'a
type Ref<'a> = <TC as Borrow>::Ref<'a> where TC: 'a
For each lifetime, a reference with that lifetime. Read more
Source§type Borrowed<'a> = Repeats<<TC as Borrow>::Borrowed<'a>, &'a [u64], &'a [u64], &'a [u64]>
where
TC: 'a
type Borrowed<'a> = Repeats<<TC as Borrow>::Borrowed<'a>, &'a [u64], &'a [u64], &'a [u64]> where TC: '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
TC: 'a,
fn reborrow<'b, 'a: 'b>(thing: Self::Borrowed<'a>) -> Self::Borrowed<'b>where
TC: '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<TC: Container> Container for Repeats<TC>
impl<TC: Container> Container for Repeats<TC>
fn reserve_for<'a, I>(&mut self, selves: I)
Source§impl<'a, TC: FromBytes<'a>, CC: FromBytes<'a>, VC: FromBytes<'a>> FromBytes<'a> for Repeats<TC, CC, VC, &'a [u64]>
impl<'a, TC: FromBytes<'a>, CC: FromBytes<'a>, VC: FromBytes<'a>> FromBytes<'a> for Repeats<TC, CC, VC, &'a [u64]>
Source§const SLICE_COUNT: usize = Options<TC, CC, VC, &'a [u64]>::SLICE_COUNT
const SLICE_COUNT: usize = Options<TC, CC, VC, &'a [u64]>::SLICE_COUNT
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<'a, TC> Index for &'a Repeats<TC>
impl<'a, TC> Index for &'a Repeats<TC>
Source§impl<TC: Index, CC: IndexAs<u64> + Len, VC: IndexAs<u64> + Len, WC: IndexAs<u64>> Index for Repeats<TC, CC, VC, WC>
impl<TC: Index, CC: IndexAs<u64> + Len, VC: IndexAs<u64> + Len, WC: IndexAs<u64>> Index for Repeats<TC, CC, VC, WC>
Source§impl<TC: PartialEq, CC: PartialEq, VC: PartialEq, WC: PartialEq> PartialEq for Repeats<TC, CC, VC, WC>
impl<TC: PartialEq, CC: PartialEq, VC: PartialEq, WC: PartialEq> PartialEq for Repeats<TC, CC, VC, WC>
impl<TC: Copy, CC: Copy, VC: Copy, WC: Copy> Copy for Repeats<TC, CC, VC, WC>
impl<TC, CC, VC, WC> StructuralPartialEq for Repeats<TC, CC, VC, WC>
Auto Trait Implementations§
impl<TC, CC, VC, WC> Freeze for Repeats<TC, CC, VC, WC>
impl<TC, CC, VC, WC> RefUnwindSafe for Repeats<TC, CC, VC, WC>
impl<TC, CC, VC, WC> Send for Repeats<TC, CC, VC, WC>
impl<TC, CC, VC, WC> Sync for Repeats<TC, CC, VC, WC>
impl<TC, CC, VC, WC> Unpin for Repeats<TC, CC, VC, WC>
impl<TC, CC, VC, WC> UnsafeUnpin for Repeats<TC, CC, VC, WC>
impl<TC, CC, VC, WC> UnwindSafe for Repeats<TC, CC, VC, WC>
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