pub enum ShowHide {
Default(Arc<Mutex<bool>>, Arc<AtomicWaker>),
Custom(Option<PanelShowFn>, Option<PanelHideFn>),
None,
}
Expand description
A PanelShowFn
and a PanelHideFn
bundled together. Only for use with
PanelCommon::draw
.
Variants§
Default(Arc<Mutex<bool>>, Arc<AtomicWaker>)
This is designed for use with a [ManagedIntervalStream
], but other
streams can also work.
The show function sets the bool to false and wakes the Waker. The hide function sets the bool to true (indicating paused).
Custom(Option<PanelShowFn>, Option<PanelHideFn>)
The functions are provided.
None
The functions are no-ops.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ShowHide
impl !RefUnwindSafe for ShowHide
impl !Send for ShowHide
impl !Sync for ShowHide
impl Unpin for ShowHide
impl !UnwindSafe for ShowHide
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