pub struct Strides<BC = Vec<u64>, HC = [u64; 2]> {
pub head: HC,
pub bounds: BC,
}Expand description
Columnar store for non-decreasing u64 offsets with stride optimization.
head holds [stride, length]: when the first length offsets follow a
regular stride pattern ((i+1) * stride), they are stored implicitly.
Remaining offsets go into bounds. In the owned form head is [u64; 2];
in the borrowed form it is &[u64] of length 2.
Fields§
§head: HC§bounds: BCImplementations§
Trait Implementations§
Source§impl Borrow for Strides
impl Borrow for Strides
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>(item: Self::Borrowed<'a>) -> Self::Borrowed<'b>where
Self: 'a,
fn reborrow<'b, 'a: 'b>(item: Self::Borrowed<'a>) -> Self::Borrowed<'b>where
Self: 'a,
Reborrows the borrowed type to a shorter lifetime. See
Columnar::reborrow for details.Source§fn reborrow_ref<'b, 'a: 'b>(item: Self::Ref<'a>) -> Self::Ref<'b>where
Self: 'a,
fn reborrow_ref<'b, 'a: 'b>(item: Self::Ref<'a>) -> Self::Ref<'b>where
Self: 'a,
Reborrows the borrowed type to a shorter lifetime. See
Columnar::reborrow for details.Source§impl Container for Strides
impl Container for Strides
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, BC: FromBytes<'a>> FromBytes<'a> for Strides<BC, &'a [u64]>
impl<'a, BC: FromBytes<'a>> FromBytes<'a> for Strides<BC, &'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<BC: IndexAs<u64>, HC: IndexAs<u64>> Index for Strides<BC, HC>
impl<BC: IndexAs<u64>, HC: IndexAs<u64>> Index for Strides<BC, HC>
impl<BC: Copy, HC: Copy> Copy for Strides<BC, HC>
Auto Trait Implementations§
impl<BC, HC> Freeze for Strides<BC, HC>
impl<BC, HC> RefUnwindSafe for Strides<BC, HC>where
HC: RefUnwindSafe,
BC: RefUnwindSafe,
impl<BC, HC> Send for Strides<BC, HC>
impl<BC, HC> Sync for Strides<BC, HC>
impl<BC, HC> Unpin for Strides<BC, HC>
impl<BC, HC> UnsafeUnpin for Strides<BC, HC>where
HC: UnsafeUnpin,
BC: UnsafeUnpin,
impl<BC, HC> UnwindSafe for Strides<BC, HC>where
HC: UnwindSafe,
BC: 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