[][src]Struct i3status_rs::widgets::rotatingtext::RotatingTextWidget

pub struct RotatingTextWidget {
    id: usize,
    pub instance: usize,
    rotation_pos: usize,
    max_width: usize,
    dynamic_width: bool,
    rotation_interval: Duration,
    rotation_speed: Duration,
    next_rotation: Option<Instant>,
    content: String,
    icon: Option<String>,
    state: State,
    spacing: Spacing,
    shared_config: SharedConfig,
    pub rotating: bool,
    inner: I3BlockData,
}

Fields

id: usizeinstance: usizerotation_pos: usizemax_width: usizedynamic_width: boolrotation_interval: Durationrotation_speed: Durationnext_rotation: Option<Instant>content: Stringicon: Option<String>state: Statespacing: Spacingshared_config: SharedConfigrotating: boolinner: I3BlockData

Implementations

impl RotatingTextWidget[src]

pub fn new(
    id: usize,
    instance: usize,
    interval: Duration,
    speed: Duration,
    max_width: usize,
    dynamic_width: bool,
    shared_config: SharedConfig
) -> RotatingTextWidget
[src]

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

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

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

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

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

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

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

pub fn is_empty(&self) -> bool[src]

fn get_rotated_content(&self) -> String[src]

fn update(&mut self)[src]

pub fn next(&mut self) -> Result<(bool, Option<Duration>), Error>[src]

Trait Implementations

impl Clone for RotatingTextWidget[src]

impl Debug for RotatingTextWidget[src]

impl I3BarWidget for RotatingTextWidget[src]

Auto Trait Implementations

impl !RefUnwindSafe for RotatingTextWidget[src]

impl !Send for RotatingTextWidget[src]

impl !Sync for RotatingTextWidget[src]

impl Unpin for RotatingTextWidget[src]

impl UnwindSafe for RotatingTextWidget[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.