pub struct PktFmt<'o>(pub &'o dyn NetPkt);
Expand description
A static packet formatter similar to DEFAULT_PKT without using ABE expressions.
Tuple Fields§
§0: &'o dyn NetPkt
Implementations§
§impl<'o> PktFmt<'o>
impl<'o> PktFmt<'o>
pub fn to_str<F>( &self, f: &mut F, add_recv: bool, data_limit: usize ) -> Result<(), Error>where F: Write,
pub fn to_html<F>(
&self,
f: &mut F,
write_escaped_lossy_data: bool,
include: Option<&mut dyn FnMut(&dyn NetPkt, &mut F) -> Result<(), Error>>
) -> Result<(), Error>where
F: Write,
pub fn to_html<F>( &self, f: &mut F, write_escaped_lossy_data: bool, include: Option<&mut dyn FnMut(&dyn NetPkt, &mut F) -> Result<(), Error>> ) -> Result<(), Error>where F: Write,
create a html fragment describing the packet
The format is a bit arbitrary. Its designed to be safe to paste into an html document and usable for most usecases. But it is verbose and somewhat opinionated. If it doesn’t fit your usecase, just build your own template. Note: the lk-c[0..31] and lk-d[0..31] class’s are derived from the hash and should be used for color coding when appropriate.
Trait Implementations§
Auto Trait Implementations§
impl<'o> !RefUnwindSafe for PktFmt<'o>
impl<'o> !Send for PktFmt<'o>
impl<'o> !Sync for PktFmt<'o>
impl<'o> Unpin for PktFmt<'o>
impl<'o> !UnwindSafe for PktFmt<'o>
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