[][src]Trait flatk::chunked::SplitOffsetsAt

pub trait SplitOffsetsAt where
    Self: Sized
{ fn split_offsets_at(self, mid: usize) -> (Self, Self, usize); }

Required methods

fn split_offsets_at(self, mid: usize) -> (Self, Self, usize)

Loading content...

Implementors

impl<'a> SplitOffsetsAt for Offsets<&'a [usize]>[src]

fn split_offsets_at(
    self,
    mid: usize
) -> (Offsets<&'a [usize]>, Offsets<&'a [usize]>, usize)
[src]

Splits a slice of offsets at the given index into two slices such that each slice is a valid slice of offsets. This means that the element at index mid is shared between the two output slices. In addition, return the offset of the middle element: this is the value offsets[mid] - offsets[0].

Panics

Calling this function with an empty slice or with mid greater than or equal to its length will cause a panic.

impl<'a> SplitOffsetsAt for SortedChunks<&'a [usize]>[src]

Loading content...