pub struct RoaringValue { /* private fields */ }Expand description
Value type for RoaringTreemap in partitioned tables.
This struct provides the bridge between the generic partitioned storage and roaring-specific value operations. It handles:
- Serialization/deserialization of RoaringTreemap
- Size queries for segment rolling decisions
- Version management for future migrations
Implementations§
Source§impl RoaringValue
impl RoaringValue
Sourcepub fn new(bitmap: RoaringTreemap) -> Self
pub fn new(bitmap: RoaringTreemap) -> Self
Creates a new RoaringValue from an existing bitmap.
Sourcepub fn bitmap(&self) -> &RoaringTreemap
pub fn bitmap(&self) -> &RoaringTreemap
Returns a reference to the underlying bitmap.
Sourcepub fn bitmap_mut(&mut self) -> &mut RoaringTreemap
pub fn bitmap_mut(&mut self) -> &mut RoaringTreemap
Returns a mutable reference to the underlying bitmap.
Sourcepub fn into_bitmap(self) -> RoaringTreemap
pub fn into_bitmap(self) -> RoaringTreemap
Consumes the value and returns the underlying bitmap.
Sourcepub fn encode_bitmap(bitmap: &RoaringTreemap) -> Result<Vec<u8>>
pub fn encode_bitmap(bitmap: &RoaringTreemap) -> Result<Vec<u8>>
Sourcepub fn get_serialized_size(&self) -> Result<usize>
pub fn get_serialized_size(&self) -> Result<usize>
Sourcepub fn get_serialized_size_for(bitmap: &RoaringTreemap) -> Result<usize>
pub fn get_serialized_size_for(bitmap: &RoaringTreemap) -> Result<usize>
Sourcepub fn from_single(value: u64) -> Self
pub fn from_single(value: u64) -> Self
Creates a RoaringValue from a single value.
Sourcepub fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = u64>,
pub fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = u64>,
Creates a RoaringValue from an iterator of values.
Trait Implementations§
Source§impl Clone for RoaringValue
impl Clone for RoaringValue
Source§fn clone(&self) -> RoaringValue
fn clone(&self) -> RoaringValue
Returns a duplicate of the value. Read more
1.0.0 · 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 RoaringValue
impl Debug for RoaringValue
Source§impl Default for RoaringValue
impl Default for RoaringValue
Source§impl From<RoaringTreemap> for RoaringValue
impl From<RoaringTreemap> for RoaringValue
Source§fn from(value: RoaringTreemap) -> Self
fn from(value: RoaringTreemap) -> Self
Converts to this type from the input type.
Source§impl MergeableValue for RoaringValue
impl MergeableValue for RoaringValue
Source§impl PartialEq for RoaringValue
impl PartialEq for RoaringValue
Source§impl Value for RoaringValue
impl Value for RoaringValue
Source§type SelfType<'a> = RoaringValue
where
Self: 'a
type SelfType<'a> = RoaringValue where Self: 'a
SelfType<'a> must be the same type as Self with all lifetimes replaced with ’atype AsBytes<'a> = Vec<u8> where Self: 'a
Source§fn fixed_width() -> Option<usize>
fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width
Source§fn from_bytes<'a>(data: &'a [u8]) -> Self::SelfType<'a>where
Self: 'a,
fn from_bytes<'a>(data: &'a [u8]) -> Self::SelfType<'a>where
Self: 'a,
Deserializes data
Implementations may return a view over data, or an owned type
impl StructuralPartialEq for RoaringValue
Auto Trait Implementations§
impl Freeze for RoaringValue
impl RefUnwindSafe for RoaringValue
impl Send for RoaringValue
impl Sync for RoaringValue
impl Unpin for RoaringValue
impl UnwindSafe for RoaringValue
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