use le_stream::{FromLeStream, ToLeStream};
use crate::Control;
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash, FromLeStream, ToLeStream)]
pub struct Header {
control: Control,
counter: u8,
id: u8,
}
impl Header {
#[must_use]
pub const fn new(control: Control, counter: u8, id: u8) -> Self {
Self {
control,
counter,
id,
}
}
#[must_use]
pub const fn control(self) -> Control {
self.control
}
#[must_use]
pub const fn counter(self) -> u8 {
self.counter
}
#[must_use]
pub const fn id(self) -> u8 {
self.id
}
}