Struct LoggerControl

Source
pub struct LoggerControl {
    pub control_number: u8,
    pub display: String,
    pub tooltip: Option<String>,
}
Expand description

A logger mechanism where the extcap utility can send log entries to be presented in a log window. This communication is unidirectional from this extcap program to Wireshark.

A button will be displayed in the toolbar which will open the log window when clicked.

Fields§

§control_number: u8

The control number, a unique identifier for this control.

§display: String

Label of the button that opens the log window.

§tooltip: Option<String>

Tooltip shown when hovering over the UI element.

Implementations§

Source§

impl LoggerControl

Source

pub fn builder() -> LoggerControlBuilder<((), (), ())>

Create a builder for building LoggerControl. On the builder, call .control_number(...), .display(...), .tooltip(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of LoggerControl.

Source§

impl LoggerControl

Source

pub fn clear_and_add_log<'a>(&self, log: Cow<'a, str>) -> ControlPacket<'a>

Clear the log and add the given log the entry to the window.

Source

pub fn add_log<'a>(&self, log: Cow<'a, str>) -> ControlPacket<'a>

Add the log entry to the log window.

Trait Implementations§

Source§

impl Debug for LoggerControl

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PrintSentence for LoggerControl

Source§

fn format_sentence(&self, f: &mut Formatter<'_>) -> Result

The extcap interface expects certain output “sentences” to stdout to communicate with Wireshark, like Read more
Source§

fn print_sentence(&self)

Prints the extcap sentence to stdout.
Source§

impl ToolbarControl for LoggerControl

Source§

fn control_number(&self) -> u8

The control number, a unique identifier for this control.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.