Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/quantile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ impl QuantilesResult {
&self.entries
}

/// Returns the quantile-to-bucket mappings, sorted by quantile.
///
/// Consumes self, returning the mapping by value instead of reference.
pub fn into_entries(self) -> BTreeMap<Quantile, Bucket> {
self.entries
}

/// Look up the bucket for a specific quantile.
pub fn get(&self, quantile: &Quantile) -> Option<&Bucket> {
self.entries.get(quantile)
Expand Down