use crate::errors::PcapError;
use byteorder::ByteOrder;
use std::borrow::Cow;
use derive_into_owned::IntoOwned;
#[derive(Clone, Debug, IntoOwned)]
pub struct SystemdJournalExportBlock<'a> {
pub journal_entry: Cow<'a, [u8]>,
}
impl<'a> SystemdJournalExportBlock<'a> {
pub fn from_slice<B: ByteOrder>(slice: &'a [u8]) -> Result<(&'a[u8], Self), PcapError> {
let packet = SystemdJournalExportBlock {
journal_entry: Cow::Borrowed(slice),
};
Ok((&[], packet))
}
}