StatusBarOverride

Struct StatusBarOverride 

Source
pub struct StatusBarOverride { /* private fields */ }
Expand description

Builder that can be used to customize the status bar override before applying it.

Implementations§

Source§

impl StatusBarOverride

Source

pub fn time(&mut self, time: &str) -> &mut StatusBarOverride

Updates the time that is shown in the status bar.

Source

pub fn data_network( &mut self, data_network: DataNetworkType, ) -> &mut StatusBarOverride

Updates the data network type that is shown in the status bar (e.g. 3G or 4G).

Source

pub fn wifi_mode(&mut self, wifi_mode: WifiMode) -> &mut StatusBarOverride

Updates the wifi mode that is shown in the status bar (i.e. whether it’s active or not).

Source

pub fn wifi_bars(&mut self, wifi_bars: usize) -> &mut StatusBarOverride

Updates the number of wifi bars that are shown in the status bar. This is only applicable if the wifi mode is WifiMode::Active.

Source

pub fn cellular_mode( &mut self, cellular_mode: CellularMode, ) -> &mut StatusBarOverride

Updates the cellular mode that is shown in the status bar (i.e. whether it’s active or not).

Source

pub fn cellular_bars(&mut self, cellular_bars: usize) -> &mut StatusBarOverride

Updates the number of cellular bars that are shown in the status bar. This is only applicable if the cellular mode is CellularMode::Active.

Source

pub fn operator_name(&mut self, name: &str) -> &mut StatusBarOverride

Updates the operator name that is shown in the status bar. This is only applicable if the cellular mode is CellularMode::Active.

Source

pub fn battery_state(&mut self, state: BatteryState) -> &mut StatusBarOverride

Updates the battery state that is shown in the status bar.

Source

pub fn battery_level(&mut self, level: usize) -> &mut StatusBarOverride

Updates the battery state that is shown in the status bar. This is only applicable if the battery state is BatteryState::Discharging.

Source

pub fn apply(&self) -> Result<()>

Applies this override to the status bar.

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.