mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-04 00:02:55 +00:00
add Display for ByteCount (#1949)
* add Display for ByteCount * export missing AggregationLimits
This commit is contained in:
@@ -13,6 +13,12 @@ impl std::fmt::Debug for ByteCount {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl std::fmt::Display for ByteCount {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
f.write_str(&self.human_readable())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const SUFFIX_AND_THRESHOLD: [(&str, u64); 5] = [
|
const SUFFIX_AND_THRESHOLD: [(&str, u64); 5] = [
|
||||||
("KB", 1_000),
|
("KB", 1_000),
|
||||||
("MB", 1_000_000),
|
("MB", 1_000_000),
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ use std::fmt::Display;
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod agg_tests;
|
mod agg_tests;
|
||||||
|
|
||||||
|
pub use agg_limits::AggregationLimits;
|
||||||
pub use collector::{
|
pub use collector::{
|
||||||
AggregationCollector, AggregationSegmentCollector, DistributedAggregationCollector,
|
AggregationCollector, AggregationSegmentCollector, DistributedAggregationCollector,
|
||||||
DEFAULT_BUCKET_LIMIT,
|
DEFAULT_BUCKET_LIMIT,
|
||||||
|
|||||||
Reference in New Issue
Block a user