[][src]Struct i3status_rs::widgets::text::TextWidget

pub struct TextWidget {
    id: usize,
    pub instance: usize,
    content: Option<String>,
    icon: Option<String>,
    state: State,
    spacing: Spacing,
    shared_config: SharedConfig,
    inner: I3BlockData,
}

Fields

id: usizeinstance: usizecontent: Option<String>icon: Option<String>state: Statespacing: Spacingshared_config: SharedConfiginner: I3BlockData

Implementations

impl TextWidget[src]

pub fn new(id: usize, instance: usize, shared_config: SharedConfig) -> Self[src]

pub fn with_icon(self, name: &str) -> Result<Self, Error>[src]

pub fn with_text(self, content: &str) -> Self[src]

pub fn with_state(self, state: State) -> Self[src]

pub fn with_spacing(self, spacing: Spacing) -> Self[src]

pub fn set_icon(&mut self, name: &str) -> Result<(), Error>[src]

pub fn set_text(&mut self, content: String)[src]

pub fn set_state(&mut self, state: State)[src]

pub fn set_spacing(&mut self, spacing: Spacing)[src]

fn update(&mut self)[src]

Trait Implementations

impl Clone for TextWidget[src]

impl Debug for TextWidget[src]

impl I3BarWidget for TextWidget[src]

Auto Trait Implementations

impl !RefUnwindSafe for TextWidget[src]

impl !Send for TextWidget[src]

impl !Sync for TextWidget[src]

impl Unpin for TextWidget[src]

impl UnwindSafe for TextWidget[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.