diff --git a/src/frame.rs b/src/frame.rs index c1089b0..1234245 100644 --- a/src/frame.rs +++ b/src/frame.rs @@ -179,6 +179,12 @@ impl Data { }) } + /// Creates an unchecked data from payload and size + #[inline] + pub const unsafe fn new_unchecked(len: u8, bytes: [u8; 8]) -> Self { + Self { len, bytes } + } + /// Creates an empty data payload containing 0 bytes. #[inline] pub const fn empty() -> Self {