1use tls_codec::{TlsSerialize, TlsSize, VLBytes};
4
5pub type ComponentId = u16;
7
8#[derive(Debug, TlsSerialize, TlsSize)]
10pub(crate) struct ComponentOperationLabel {
11 base_label: VLBytes,
13 component_id: ComponentId,
14 label: VLBytes,
15}
16
17const COMPONENT_OPERATION_BASE_LABEL: &[u8] = b"Application";
18
19impl ComponentOperationLabel {
20 pub fn new(component_id: ComponentId, label: &str) -> Self {
22 Self {
23 base_label: COMPONENT_OPERATION_BASE_LABEL.into(),
24 component_id,
25 label: label.as_bytes().into(),
26 }
27 }
28}