pub struct StringColumn { /* private fields */ }Expand description
A column of strings: the views, and the blocks the long ones live in.
Blocks are append only and never move, so an offset recorded in a view stays correct for the
life of the column. Pushing a string longer than a block gives it a block of its own rather
than splitting it, which keeps every string contiguous and keeps Self::get free of a
stitching path that would be wrong more often than it ran.
Implementations§
Source§impl StringColumn
impl StringColumn
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
An empty column with room for capacity strings.
Sourcepub fn views(&self) -> &[StringView]
pub fn views(&self) -> &[StringView]
The views, for a kernel that wants to compare prefixes without reading any payload.
Sourcepub fn heap_bytes(&self) -> usize
pub fn heap_bytes(&self) -> usize
Total bytes of payload held in blocks, which is what the memory accounting wants.
Trait Implementations§
Source§impl Clone for StringColumn
impl Clone for StringColumn
Source§fn clone(&self) -> StringColumn
fn clone(&self) -> StringColumn
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StringColumn
impl Debug for StringColumn
Source§impl Default for StringColumn
impl Default for StringColumn
Source§fn default() -> StringColumn
fn default() -> StringColumn
Returns the “default value” for a type. Read more
impl Eq for StringColumn
Source§impl<'a> Extend<&'a str> for StringColumn
impl<'a> Extend<&'a str> for StringColumn
Source§fn extend<T: IntoIterator<Item = &'a str>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = &'a str>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<'a> FromIterator<&'a str> for StringColumn
impl<'a> FromIterator<&'a str> for StringColumn
Source§impl PartialEq for StringColumn
impl PartialEq for StringColumn
impl StructuralPartialEq for StringColumn
Auto Trait Implementations§
impl Freeze for StringColumn
impl RefUnwindSafe for StringColumn
impl Send for StringColumn
impl Sync for StringColumn
impl Unpin for StringColumn
impl UnsafeUnpin for StringColumn
impl UnwindSafe for StringColumn
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