Struct lazybar_core::panels::Clock
source · pub struct Clock<P: Clone + Precision> { /* private fields */ }
Expand description
Displays the current time, updating at a given precision.
Uses an Interval
to update as close to the unit boundaries as possible.
Available actions: cycle
and cycle_back
to change the format that is
used
Trait Implementations§
source§impl<P> PanelConfig for Clock<P>
impl<P> PanelConfig for Clock<P>
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:
- See
PanelCommon::parse_variadic
. For formats, seechrono::format::strftime
for clock-specific formatting details.
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<P> Freeze for Clock<P>
impl<P> RefUnwindSafe for Clock<P>where
P: RefUnwindSafe,
impl<P> Send for Clock<P>where
P: Send,
impl<P> Sync for Clock<P>where
P: Sync,
impl<P> Unpin for Clock<P>where
P: Unpin,
impl<P> UnwindSafe for Clock<P>where
P: UnwindSafe,
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