pub struct DataBlock<'a> {
pub header: BlockHeader,
pub data: &'a [u8],
}Fields§
§header: BlockHeader§data: &'a [u8]Implementations§
Trait Implementations§
Source§impl<'a> BlockParse<'a> for DataBlock<'a>
impl<'a> BlockParse<'a> for DataBlock<'a>
Source§fn from_bytes(bytes: &'a [u8]) -> Result<Self, MdfError>
fn from_bytes(bytes: &'a [u8]) -> Result<Self, MdfError>
Parse a DTBLOCK or DVBLOCK from the given byte slice.
Both ##DT (record data) and ##DV (sample data of a column-oriented
group) blocks share the same layout: a 24-byte header followed by raw
data. Any other block id is rejected.
The slice must contain at least the number of bytes specified by the block length in the header. Only a reference to the data portion is stored to avoid unnecessary allocations.
const ID: &'static str = "##DT"
fn parse_header(bytes: &[u8]) -> Result<BlockHeader, MdfError>
Auto Trait Implementations§
impl<'a> Forget for DataBlock<'a>
impl<'a> Freeze for DataBlock<'a>
impl<'a> Move for DataBlock<'a>
impl<'a> RefUnwindSafe for DataBlock<'a>
impl<'a> Send for DataBlock<'a>
impl<'a> Sync for DataBlock<'a>
impl<'a> Unpin for DataBlock<'a>
impl<'a> UnsafeUnpin for DataBlock<'a>
impl<'a> UnwindSafe for DataBlock<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more