pub struct ToastInstallOptions {
pub corner: Corner,
pub margin: Vec2,
pub gap: f32,
pub max_visible: usize,
pub entry_width: f32,
pub pause_on_hover_group: bool,
pub archive: Option<NotificationArchive>,
pub initial_audience: Option<ToastAudience>,
}Expand description
Configuration for the installed ToastHost. Passed to
install_toast in the teksilo umbrella crate.
Fields§
§corner: CornerWhich viewport corner the toasts anchor to. Default
BottomTrailing (matches JetBrains IntelliJ and Windows
system tray conventions). Under RTL, Trailing flips to the
physical left edge.
margin: Vec2Outer margin from the corner — (x, y) in logical pixels.
Default (24, 24).
gap: f32Vertical gap between stacked toasts. Default 8.0.
max_visible: usizeMaximum simultaneously visible toasts. Default 5. Normal
priority overflow drops; High / Urgent evict the oldest Normal.
entry_width: f32Fixed width for each toast surface. Default 380.0 (matches
IntelliJ balloon width).
pause_on_hover_group: boolWhen true (default), hovering any toast pauses every timer. When false, only the hovered toast pauses (libadwaita behaviour).
archive: Option<NotificationArchive>Notification archive — None disables archival entirely
(apps don’t need a NotificationLog). Default:
Some(NotificationArchive::persistent(ARCHIVE_FILE_NAME)),
which writes to <config>/notifications.toml via
PersistedListModel. Apps that don’t have AppPaths
configured (SettingsBundle not installed) should explicitly
override to Some(NotificationArchive::in_memory()) or
None — Persistent will fail at install time without a
config_dir.
initial_audience: Option<ToastAudience>Audience to seed this window with, the first time its
ToastHost observes a real window (see ToastHost::build).
Default None — the window starts unassigned (its toasts/bell
show only origin-window-routed and broadcast entries) until app
code calls ToastRegistry::set_window_audience explicitly.
Because install_toast’s DefaultPostRoot closure clones the
SAME ToastInstallOptions for every window it wraps, this
field gives every window the SAME initial audience — it is NOT
a way to give distinct windows distinct starting audiences
through the shared install path. Apps that need per-window
initial audiences should call set_window_audience right after
creating each window instead (typically from the window-opened
handler that also knows which document/session that window is
showing).
Trait Implementations§
Source§impl Clone for ToastInstallOptions
impl Clone for ToastInstallOptions
Source§fn clone(&self) -> ToastInstallOptions
fn clone(&self) -> ToastInstallOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToastInstallOptions
impl Debug for ToastInstallOptions
Auto Trait Implementations§
impl Freeze for ToastInstallOptions
impl RefUnwindSafe for ToastInstallOptions
impl Send for ToastInstallOptions
impl Sync for ToastInstallOptions
impl Unpin for ToastInstallOptions
impl UnsafeUnpin for ToastInstallOptions
impl UnwindSafe for ToastInstallOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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