pub struct QuickFilterData {
pub batch_size: usize,
pub ptr_ranges: Vec<(usize, usize)>,
pub size_ranges: Vec<(usize, usize)>,
pub timestamp_ranges: Vec<(u64, u64)>,
pub thread_bloom_filter: Vec<u8>,
pub type_bloom_filter: Vec<u8>,
pub bloom_filter_params: BloomFilterParams,
}
Expand description
Quick filtering data for large files to enable fast pre-filtering
Fields§
§batch_size: usize
Batch size used for range calculations (e.g., 1000 records per batch)
ptr_ranges: Vec<(usize, usize)>
Pointer value ranges for each batch of records
size_ranges: Vec<(usize, usize)>
Size ranges for each batch of records
timestamp_ranges: Vec<(u64, u64)>
Timestamp ranges for each batch of records
thread_bloom_filter: Vec<u8>
Bloom filter for thread IDs (serialized as bytes)
type_bloom_filter: Vec<u8>
Bloom filter for type names (serialized as bytes)
bloom_filter_params: BloomFilterParams
Bloom filter parameters
Implementations§
Source§impl QuickFilterData
impl QuickFilterData
Sourcepub fn new(batch_size: usize) -> Self
pub fn new(batch_size: usize) -> Self
Create new quick filter data with the specified batch size
Sourcepub fn memory_usage(&self) -> usize
pub fn memory_usage(&self) -> usize
Get memory usage of this quick filter data in bytes
Sourcepub fn ptr_might_be_in_batch(&self, batch_index: usize, ptr: usize) -> bool
pub fn ptr_might_be_in_batch(&self, batch_index: usize, ptr: usize) -> bool
Check if a pointer value might be in the specified batch
Sourcepub fn size_might_be_in_batch(&self, batch_index: usize, size: usize) -> bool
pub fn size_might_be_in_batch(&self, batch_index: usize, size: usize) -> bool
Check if a size value might be in the specified batch
Sourcepub fn timestamp_might_be_in_batch(
&self,
batch_index: usize,
timestamp: u64,
) -> bool
pub fn timestamp_might_be_in_batch( &self, batch_index: usize, timestamp: u64, ) -> bool
Check if a timestamp might be in the specified batch
Trait Implementations§
Source§impl Clone for QuickFilterData
impl Clone for QuickFilterData
Source§fn clone(&self) -> QuickFilterData
fn clone(&self) -> QuickFilterData
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 QuickFilterData
impl Debug for QuickFilterData
Source§impl<'de> Deserialize<'de> for QuickFilterData
impl<'de> Deserialize<'de> for QuickFilterData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QuickFilterData
impl RefUnwindSafe for QuickFilterData
impl Send for QuickFilterData
impl Sync for QuickFilterData
impl Unpin for QuickFilterData
impl UnwindSafe for QuickFilterData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more