pub struct ShowState<Key: Eq + Hash> { /* private fields */ }Expand description
This encodes the current state of the heatmap
Implementations§
Source§impl<Key: Hash + Eq + Clone> ShowState<Key>
impl<Key: Hash + Eq + Clone> ShowState<Key>
Sourcepub fn make_selected(&mut self, selected: HashSet<CoordinatePoint>)
pub fn make_selected(&mut self, selected: HashSet<CoordinatePoint>)
Select the given positions and only those
Sourcepub fn clear_selected(&mut self)
pub fn clear_selected(&mut self)
Clear selected positions
Sourcepub fn selected(&self) -> &HashSet<CoordinatePoint>
pub fn selected(&self) -> &HashSet<CoordinatePoint>
Get the currently selected points
Sourcepub fn currently_showing(&self) -> Option<CoordinateRect>
pub fn currently_showing(&self) -> Option<CoordinateRect>
Fetch rectangle which is currently shown
Sourcepub fn render_problem(&self) -> Option<&RenderProblem>
pub fn render_problem(&self) -> Option<&RenderProblem>
Check if there was an issue will rendering
Sourcepub fn clicked(&self) -> Option<&MultiMapPosition<Key>>
pub fn clicked(&self) -> Option<&MultiMapPosition<Key>>
Check if position was clicked
Sourcepub fn hover(&self) -> &MultiMapPosition<Key>
pub fn hover(&self) -> &MultiMapPosition<Key>
Check if position was clicked
Trait Implementations§
Source§impl<'de, Key> Deserialize<'de> for ShowState<Key>
impl<'de, Key> Deserialize<'de> for ShowState<Key>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<Key> Freeze for ShowState<Key>where
Key: Freeze,
impl<Key> RefUnwindSafe for ShowState<Key>where
Key: RefUnwindSafe,
impl<Key> Send for ShowState<Key>where
Key: Send,
impl<Key> Sync for ShowState<Key>where
Key: Sync,
impl<Key> Unpin for ShowState<Key>where
Key: Unpin,
impl<Key> UnwindSafe for ShowState<Key>where
Key: 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
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