pub struct BooleanControl {
pub control_number: u8,
pub display: String,
pub tooltip: Option<String>,
pub default_value: bool,
}
Expand description
A checkbox which lets the user set a true / false value.
The extcap utility can set a default value at startup, change the value
using set_checked
, and receive value changes from an
ExtcapControlReader
. When starting a
capture Wireshark will send the value if different from the default value.
Fields§
§control_number: u8
The control number, a unique identifier for this control.
display: String
The user-visible label for the check box.
tooltip: Option<String>
Tooltip shown when hovering over the UI element.
default_value: bool
Whether the control should be checked or unchecked by default
Implementations§
Source§impl BooleanControl
impl BooleanControl
Sourcepub fn builder() -> BooleanControlBuilder<((), (), (), ())>
pub fn builder() -> BooleanControlBuilder<((), (), (), ())>
Create a builder for building BooleanControl
.
On the builder, call .control_number(...)
, .display(...)
, .tooltip(...)
(optional), .default_value(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of BooleanControl
.
Source§impl BooleanControl
impl BooleanControl
Sourcepub fn set_checked<'a>(&self, checked: bool) -> ControlPacket<'a>
pub fn set_checked<'a>(&self, checked: bool) -> ControlPacket<'a>
Set whether this checkbox is checked.