Skip to main content

tinyquant_io/codec_file/
metadata.rs

1//! Opaque metadata blob view.
2
3/// Opaque metadata bytes from a Level-2 TQCV header.
4pub struct MetadataBlob<'a> {
5    bytes: &'a [u8],
6}
7
8impl<'a> MetadataBlob<'a> {
9    /// Wrap a slice as a metadata blob.
10    pub const fn new(bytes: &'a [u8]) -> Self {
11        Self { bytes }
12    }
13
14    /// Return the raw bytes.
15    pub const fn as_bytes(&self) -> &[u8] {
16        self.bytes
17    }
18}