pub struct Network { /* private fields */ }
Expand description
Displays information about the current network connection on a given interface.
Trait Implementations§
Source§impl PanelConfig for Network
impl PanelConfig for Network
Source§fn parse(
name: &'static str,
table: &mut HashMap<String, Value>,
_global: &Config,
) -> Result<Self>
fn parse( name: &'static str, table: &mut HashMap<String, Value>, _global: &Config, ) -> Result<Self>
Parses an instance of the panel from the global Config
Configuration options:
if_name
: the name of the given interface. These can be listed withip link
.- type: String
- default: “wlan0”
interval
: the amount of time in seconds to wait between polls- type: u64
- default: 10
format_connected
: the format string when there is a connection present on the interface- type: String
- default: “%ifname% %essid% %local_ip%”
format_disconnected
: the format string when there is no connection present on the interface- type: String
- default: “%ifname% disconnected”
attrs
: A string specifying the attrs for the panel. SeeAttrs::parse
for details.highlight
: A string specifying the highlight for the panel. SeeHighlight::parse
for details.- See
PanelCommon::parse_common
.
Source§fn props(&self) -> (&'static str, bool)
fn props(&self) -> (&'static str, bool)
Returns the name of the panel. If the panel supports events, each
instance must return a unique name.
Source§fn run<'async_trait>(
self: Box<Self>,
cr: Rc<Context>,
global_attrs: Attrs,
height: i32,
) -> Pin<Box<dyn Future<Output = PanelRunResult> + 'async_trait>>where
Self: 'async_trait,
fn run<'async_trait>(
self: Box<Self>,
cr: Rc<Context>,
global_attrs: Attrs,
height: i32,
) -> Pin<Box<dyn Future<Output = PanelRunResult> + 'async_trait>>where
Self: 'async_trait,
Performs any necessary setup, then returns a
PanelStream
representing the provided PanelConfig
. Read moreAuto Trait Implementations§
impl Freeze for Network
impl !RefUnwindSafe for Network
impl !Send for Network
impl !Sync for Network
impl Unpin for Network
impl !UnwindSafe for Network
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