Struct lazybar_core::panels::Network
source · 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>
Configuration options:
-
if_name
: the name of the given interface. These can be listed withip link
.- type: String
- default: “wlan0”
-
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”
-
interval
: the amount of time in seconds to wait between polls- type: u64
- default: 10
-
See
PanelCommon::parse
.
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(
self: Box<Self>,
cr: Rc<Context>,
global_attrs: Attrs,
height: i32,
) -> Result<(PanelStream, Option<ChannelEndpoint<Event, EventResponse>>)>
fn run( self: Box<Self>, cr: Rc<Context>, global_attrs: Attrs, height: i32, ) -> Result<(PanelStream, Option<ChannelEndpoint<Event, EventResponse>>)>
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