Struct i3status_rs::widget::Widget
source · pub struct Widget {
pub state: State,
/* private fields */
}
Fields§
§state: State
Implementations§
source§impl Widget
impl Widget
pub fn new() -> Self
pub fn with_text(self, text: String) -> Self
pub fn with_state(self, state: State) -> Self
pub fn with_format(self, format: Format) -> Self
pub fn set_text(&mut self, text: String)
pub fn set_format(&mut self, format: Format)
pub fn set_values(&mut self, new_values: Values)
pub fn intervals(&self) -> Vec<u64>
sourcepub fn get_data(
&self,
shared_config: &SharedConfig,
id: usize,
) -> Result<Vec<I3BarBlock>>
pub fn get_data( &self, shared_config: &SharedConfig, id: usize, ) -> Result<Vec<I3BarBlock>>
Construct I3BarBlock
from this widget
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Widget
impl !RefUnwindSafe for Widget
impl Send for Widget
impl Sync for Widget
impl Unpin for Widget
impl !UnwindSafe for Widget
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.