pub struct SimpleToastState {
pub visibility: HashMap<String, bool>,
pub opacity: HashMap<String, f64>,
pub remaining_duration_ms: HashMap<String, u32>,
pub vertical_offset: HashMap<String, f64>,
pub hovered: HashMap<String, bool>,
}Expand description
Simple implementation of ToastState for prototyping
Fields§
§visibility: HashMap<String, bool>§opacity: HashMap<String, f64>§remaining_duration_ms: HashMap<String, u32>§vertical_offset: HashMap<String, f64>§hovered: HashMap<String, bool>Implementations§
Source§impl SimpleToastState
impl SimpleToastState
pub fn new() -> Self
pub fn remove_toast(&mut self, toast_id: &str)
Trait Implementations§
Source§impl Clone for SimpleToastState
impl Clone for SimpleToastState
Source§fn clone(&self) -> SimpleToastState
fn clone(&self) -> SimpleToastState
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 SimpleToastState
impl Debug for SimpleToastState
Source§impl Default for SimpleToastState
impl Default for SimpleToastState
Source§fn default() -> SimpleToastState
fn default() -> SimpleToastState
Returns the “default value” for a type. Read more
Source§impl ToastState for SimpleToastState
impl ToastState for SimpleToastState
fn is_visible(&self, toast_id: &str) -> bool
fn opacity(&self, toast_id: &str) -> f64
fn remaining_duration_ms(&self, toast_id: &str) -> u32
fn vertical_offset(&self, toast_id: &str) -> f64
fn is_hovered(&self, toast_id: &str) -> bool
fn set_visible(&mut self, toast_id: &str, visible: bool)
fn set_opacity(&mut self, toast_id: &str, opacity: f64)
fn set_remaining_duration_ms(&mut self, toast_id: &str, ms: u32)
fn set_vertical_offset(&mut self, toast_id: &str, offset: f64)
fn set_hovered(&mut self, toast_id: &str, hovered: bool)
Auto Trait Implementations§
impl Freeze for SimpleToastState
impl RefUnwindSafe for SimpleToastState
impl Send for SimpleToastState
impl Sync for SimpleToastState
impl Unpin for SimpleToastState
impl UnsafeUnpin for SimpleToastState
impl UnwindSafe for SimpleToastState
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