pub struct ClassGroupBreakdown { /* private fields */ }Expand description
A class-id-keyed slice axis: a name plus a list of ClassGroups.
The sibling of Breakdown for class-id partitions. Used by
semantic (ADR-0041) and panoptic (ADR-0042) class_grouping
fields. Carries strict partition discipline — no class id may
appear in two groups.
§Invariants (debug-checked at construction)
groupsis non-empty.- Every
ClassGroup::indexis unique and lies in0..groups.len(). - No class id appears in two groups (partition discipline).
- Group labels are unique.
Implementations§
Source§impl ClassGroupBreakdown
impl ClassGroupBreakdown
Sourcepub fn new(axis: impl Into<Cow<'static, str>>, groups: Vec<ClassGroup>) -> Self
pub fn new(axis: impl Into<Cow<'static, str>>, groups: Vec<ClassGroup>) -> Self
Construct from an axis name and a list of groups.
§Panics
In debug builds, panics if groups is empty, has duplicate /
out-of-range indices, has duplicate labels, or has a class id
appearing in two groups. Release builds silently accept the
degenerate input — no memory safety risk under
#![forbid(unsafe_code)].
Sourcepub fn groups(&self) -> &[ClassGroup]
pub fn groups(&self) -> &[ClassGroup]
All groups, in construction order.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Number of groups — the size of the group axis the summarizer emits one row per.
Sourcepub fn group_at(&self, index: usize) -> Option<&ClassGroup>
pub fn group_at(&self, index: usize) -> Option<&ClassGroup>
Group at axis position index, or None if absent.
Sourcepub fn group_of(&self, class_id: u32) -> Option<&ClassGroup>
pub fn group_of(&self, class_id: u32) -> Option<&ClassGroup>
Look up the group containing class_id. None if no group
covers it (partition allows un-grouped ids — they’re simply
excluded from per-group rollups).
Trait Implementations§
Source§impl Clone for ClassGroupBreakdown
impl Clone for ClassGroupBreakdown
Source§fn clone(&self) -> ClassGroupBreakdown
fn clone(&self) -> ClassGroupBreakdown
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClassGroupBreakdown
impl Debug for ClassGroupBreakdown
Source§impl PartialEq for ClassGroupBreakdown
impl PartialEq for ClassGroupBreakdown
Source§fn eq(&self, other: &ClassGroupBreakdown) -> bool
fn eq(&self, other: &ClassGroupBreakdown) -> bool
self and other values to be equal, and is used by ==.impl Eq for ClassGroupBreakdown
impl StructuralPartialEq for ClassGroupBreakdown
Auto Trait Implementations§
impl Freeze for ClassGroupBreakdown
impl RefUnwindSafe for ClassGroupBreakdown
impl Send for ClassGroupBreakdown
impl Sync for ClassGroupBreakdown
impl Unpin for ClassGroupBreakdown
impl UnsafeUnpin for ClassGroupBreakdown
impl UnwindSafe for ClassGroupBreakdown
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.