pub trait ExtcapControlSenderTrait:
Send
+ Sync
+ Sized {
// Required method
fn send<'life0, 'async_trait>(
self,
packet: ControlPacket<'life0>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn info_message<'life0, 'async_trait>(
self,
message: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn warning_message<'life0, 'async_trait>(
self,
message: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn error_message<'life0, 'async_trait>(
self,
message: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn status_message<'life0, 'async_trait>(
self,
message: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Sender for extcap control packets. These control packets controls the UI
generated by Wireshark. This trait also provides convenience functions for
sending control packets formatted for particular usages like info_message
and status_message
. For other functions controlling various toolbar
controls, see the methods in the control
module instead.
Required Methods§
Provided Methods§
Sourcefn info_message<'life0, 'async_trait>(
self,
message: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn info_message<'life0, 'async_trait>(
self,
message: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shows a message in an information dialog popup. The message will show on the screen until the user dismisses the popup.
Sourcefn warning_message<'life0, 'async_trait>(
self,
message: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn warning_message<'life0, 'async_trait>(
self,
message: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shows a message in a warning dialog popup. The message will show on the screen until the user dismisses the popup.
Sourcefn error_message<'life0, 'async_trait>(
self,
message: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn error_message<'life0, 'async_trait>(
self,
message: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shows a message in an error dialog popup. The message will show on the screen until the user dismisses the popup.
Sourcefn status_message<'life0, 'async_trait>(
self,
message: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status_message<'life0, 'async_trait>(
self,
message: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Shows a message in the status bar at the bottom of the Wireshark window. When the message is shown, the status bar will also flash yellow to bring it to the user’s attention. The message will stay on the status bar for a few seconds, or until another message overwrites it.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<T> ExtcapControlSenderTrait for &Mutex<T>
Just for syntactic niceness when working with a control sender behind a
mutex. This usage allows the sender to be locked only for the duration of
that one control packet, so it can be interleaved in between other async
function calls.
impl<T> ExtcapControlSenderTrait for &Mutex<T>
Just for syntactic niceness when working with a control sender behind a mutex. This usage allows the sender to be locked only for the duration of that one control packet, so it can be interleaved in between other async function calls.
Source§impl<T> ExtcapControlSenderTrait for &mut Option<T>
An implementation of ExtcapControlSenderTrait that is no-op when the
Option
is None
. Since Wireshark may not include the
--extcap-control-out
flag (e.g. when no controls are returned during
--extcap-interfaces
, or when running in tshark), this allows an easier but
less efficient way to say option_extcap_sender.status_message(...)
without
constantly checking for the option.
impl<T> ExtcapControlSenderTrait for &mut Option<T>
An implementation of ExtcapControlSenderTrait that is no-op when the
Option
is None
. Since Wireshark may not include the
--extcap-control-out
flag (e.g. when no controls are returned during
--extcap-interfaces
, or when running in tshark), this allows an easier but
less efficient way to say option_extcap_sender.status_message(...)
without
constantly checking for the option.