Struct r_extcap::ExtcapFormatter
source · pub struct ExtcapFormatter<'a, T: ?Sized>(pub &'a T)
where
Self: Display;
Expand description
The extcap interface expects certain output “sentences” to stdout to communicate with Wireshark, like
extcap {version=1.0}{help=Some help url}
This formatter serves as a wrapper to implement that format via the
Display
trait, and the Extcap output can be printed out like this:
use r_extcap::interface::Metadata;
print!("{}", ExtcapFormatter(&Metadata {
version: "1.0".into(),
help_url: "Some help url".into(),
display_description: "Example extcap".into(),
}));
// Output: extcap {version=1.0}{help=Some help url}{display=Example extcap}
Tuple Fields§
§0: &'a T