pub struct SimpleOverlayState {
pub visible: HashMap<String, bool>,
pub position: HashMap<String, (f64, f64)>,
pub opacity: HashMap<String, f64>,
pub hover_start: HashMap<String, Option<Instant>>,
}Expand description
Simple implementation of OverlayState for prototyping
Fields§
§visible: HashMap<String, bool>§position: HashMap<String, (f64, f64)>§opacity: HashMap<String, f64>§hover_start: HashMap<String, Option<Instant>>Implementations§
Trait Implementations§
Source§impl Clone for SimpleOverlayState
impl Clone for SimpleOverlayState
Source§fn clone(&self) -> SimpleOverlayState
fn clone(&self) -> SimpleOverlayState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimpleOverlayState
impl Debug for SimpleOverlayState
Source§impl Default for SimpleOverlayState
impl Default for SimpleOverlayState
Source§fn default() -> SimpleOverlayState
fn default() -> SimpleOverlayState
Returns the “default value” for a type. Read more
Source§impl OverlayState for SimpleOverlayState
impl OverlayState for SimpleOverlayState
fn is_visible(&self, overlay_id: &str) -> bool
fn position(&self, overlay_id: &str) -> (f64, f64)
fn opacity(&self, overlay_id: &str) -> f64
fn hover_start_time(&self, overlay_id: &str) -> Option<Instant>
fn set_visible(&mut self, overlay_id: &str, visible: bool)
fn set_position(&mut self, overlay_id: &str, pos: (f64, f64))
fn set_opacity(&mut self, overlay_id: &str, opacity: f64)
fn set_hover_start_time(&mut self, overlay_id: &str, time: Option<Instant>)
Auto Trait Implementations§
impl Freeze for SimpleOverlayState
impl RefUnwindSafe for SimpleOverlayState
impl Send for SimpleOverlayState
impl Sync for SimpleOverlayState
impl Unpin for SimpleOverlayState
impl UnsafeUnpin for SimpleOverlayState
impl UnwindSafe for SimpleOverlayState
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