pub struct FilterStatsResult {
pub count: u64,
pub count_capped: bool,
pub total_bytes: u64,
pub by_type: HashMap<String, u64>,
pub bytes_by_type: HashMap<String, u64>,
pub total_unfiltered: u64,
pub size_buckets: Vec<u64>,
pub bpm_buckets: Vec<u64>,
pub bpm_analyzed_count: u64,
pub key_counts: HashMap<String, u64>,
pub key_analyzed_count: u64,
pub top_folders: Vec<TopFolderRow>,
}Expand description
Filtered aggregate stats — count + size + per-type breakdown reflecting the active search/filter. One round-trip: COUNT + SUM + GROUP BY in SQL.
Fields§
§count: u64§count_capped: boolTrue when count is a floor — per-type breakdown and bytes were skipped.
total_bytes: u64§by_type: HashMap<String, u64>§bytes_by_type: HashMap<String, u64>§total_unfiltered: u64§size_buckets: Vec<u64>Audio-only: file-size histogram (6 buckets, same thresholds as heatmap-dashboard.js).
bpm_buckets: Vec<u64>Audio-only: BPM histogram (34 bins, 50–220 step 5) for heatmap; empty for non-audio.
bpm_analyzed_count: u64Audio-only: library rows with bpm IS NOT NULL in the filtered scope.
key_counts: HashMap<String, u64>Audio-only: key_name → count (top keys) for heatmap key card.
key_analyzed_count: u64§top_folders: Vec<TopFolderRow>Audio-only: top directory groups (first 3 path segments), sorted by count.
Always serialized (even []) so the frontend can tell DB aggregates from a missing field.
Trait Implementations§
Source§impl Debug for FilterStatsResult
impl Debug for FilterStatsResult
Source§impl Default for FilterStatsResult
impl Default for FilterStatsResult
Auto Trait Implementations§
impl Freeze for FilterStatsResult
impl RefUnwindSafe for FilterStatsResult
impl Send for FilterStatsResult
impl Sync for FilterStatsResult
impl Unpin for FilterStatsResult
impl UnwindSafe for FilterStatsResult
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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