1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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))
}
}