pub struct ToastQueue { /* private fields */ }Expand description
Centralized toast queue manager
Implementations§
Source§impl ToastQueue
impl ToastQueue
Sourcepub fn position(self, position: ToastPosition) -> Self
pub fn position(self, position: ToastPosition) -> Self
Set the position
Sourcepub fn stack_direction(self, direction: StackDirection) -> Self
pub fn stack_direction(self, direction: StackDirection) -> Self
Set stack direction
Sourcepub fn max_visible(self, max: usize) -> Self
pub fn max_visible(self, max: usize) -> Self
Set maximum visible toasts
Sourcepub fn default_duration(self, duration: Duration) -> Self
pub fn default_duration(self, duration: Duration) -> Self
Set default duration
Sourcepub fn toast_width(self, width: u16) -> Self
pub fn toast_width(self, width: u16) -> Self
Set toast width
Sourcepub fn deduplicate(self, deduplicate: bool) -> Self
pub fn deduplicate(self, deduplicate: bool) -> Self
Enable/disable deduplication
Sourcepub fn push(&mut self, message: impl Into<String>, level: ToastLevel)
pub fn push(&mut self, message: impl Into<String>, level: ToastLevel)
Push a simple toast
Sourcepub fn push_with_id(
&mut self,
id: impl Into<String>,
message: impl Into<String>,
level: ToastLevel,
)
pub fn push_with_id( &mut self, id: impl Into<String>, message: impl Into<String>, level: ToastLevel, )
Push a toast with an ID for deduplication
Sourcepub fn push_entry(&mut self, entry: ToastEntry)
pub fn push_entry(&mut self, entry: ToastEntry)
Push a toast entry
Sourcepub fn dismiss_first(&mut self)
pub fn dismiss_first(&mut self)
Dismiss the first visible toast
Sourcepub fn dismiss_all(&mut self)
pub fn dismiss_all(&mut self)
Dismiss all toasts
Sourcepub fn visible_count(&self) -> usize
pub fn visible_count(&self) -> usize
Get count of visible toasts
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Get count of pending toasts
Sourcepub fn total_count(&self) -> usize
pub fn total_count(&self) -> usize
Get total toast count
Source§impl ToastQueue
impl ToastQueue
Trait Implementations§
Source§impl Default for ToastQueue
impl Default for ToastQueue
Source§impl StyledView for ToastQueue
impl StyledView for ToastQueue
Source§fn remove_class(&mut self, class: &str)
fn remove_class(&mut self, class: &str)
Remove a CSS class
Source§fn toggle_class(&mut self, class: &str)
fn toggle_class(&mut self, class: &str)
Toggle a CSS class
Source§impl View for ToastQueue
impl View for ToastQueue
Source§fn meta(&self) -> WidgetMeta
fn meta(&self) -> WidgetMeta
Get widget metadata for DOM
Source§fn render(&self, ctx: &mut RenderContext<'_>)
fn render(&self, ctx: &mut RenderContext<'_>)
Render the view
Source§fn widget_type(&self) -> &'static str
fn widget_type(&self) -> &'static str
Get widget type name (for CSS type selectors)
Auto Trait Implementations§
impl Freeze for ToastQueue
impl RefUnwindSafe for ToastQueue
impl Send for ToastQueue
impl Sync for ToastQueue
impl Unpin for ToastQueue
impl UnwindSafe for ToastQueue
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().