Skip to main content

reifydb_core/state/
group.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2026 ReifyDB
3
4use reifydb_macro::operator_state;
5
6use crate::metrics::heap::HeapSize;
7
8#[operator_state]
9#[derive(Debug, Clone, Default, PartialEq, Eq)]
10pub struct GroupRecord {
11	pub group: Vec<u8>,
12}
13
14impl GroupRecord {
15	pub fn new(group: impl Into<Vec<u8>>) -> Self {
16		Self {
17			group: group.into(),
18		}
19	}
20}
21
22impl HeapSize for GroupRecord {
23	fn heap_size(&self) -> usize {
24		self.group.capacity()
25	}
26}