pub struct ToastViewport { /* private fields */ }Expand description
A controlled, unstyled toast-viewport descriptor.
The application owns the viewport’s placement, stacking, spacing, colors, icons, and motion. QuickGUI supplies stable identities, live-region announcements chosen by toast kind, exact title and description relationships, and focused Escape dismissal.
Implementations§
Source§impl ToastViewport
impl ToastViewport
pub fn new(root_id: impl Into<ElementId>) -> Self
pub const fn viewport_id(self) -> ElementId
Sourcepub fn viewport_with(self, viewport: Element) -> Element
pub fn viewport_with(self, viewport: Element) -> Element
Decorate the application-owned viewport without adding layout or appearance.
The viewport itself is an ordinary group; each toast is its own live region, so an unchanged queue announces nothing.
Sourcepub fn viewport(self) -> Element
pub fn viewport(self) -> Element
Create the unstyled viewport part. Use Self::viewport_with to supply an existing element.
Sourcepub fn portal_id(self) -> ElementId
pub fn portal_id(self) -> ElementId
Stable identity of the portal the viewport is mounted inside.
Sourcepub fn portal_with(self, portal: Element) -> Element
pub fn portal_with(self, portal: Element) -> Element
Decorate a caller-owned window-level portal for the toast layer.
Base UI renders the viewport into a portal so toasts escape the layout that raised them. QuickGUI’s overlay plane does the same, and this part deliberately does not block pointer input: a full-window toast layer that swallowed clicks would break every control underneath it. Placement, size, and stacking direction stay application-owned.
Sourcepub fn portal(self) -> Element
pub fn portal(self) -> Element
Create the unstyled portal part. Use Self::portal_with to supply an existing element.
Sourcepub fn toast(self, entry: &ToastEntry) -> ToastParts
pub fn toast(self, entry: &ToastEntry) -> ToastParts
Describe the parts of one queued toast.
index counts from the newest toast, which is the order an application stacks them in.
Sourcepub fn toasts(
self,
manager: &ToastManager,
) -> impl Iterator<Item = ToastParts> + '_
pub fn toasts( self, manager: &ToastManager, ) -> impl Iterator<Item = ToastParts> + '_
Describe the parts of every queued toast, newest first.
Each descriptor carries its own stack index, the provider’s limited flag, and the manager’s
expanded state, which is everything Base UI publishes as data-index, data-limited, and
data-expanded.
Trait Implementations§
Source§impl Clone for ToastViewport
impl Clone for ToastViewport
impl Copy for ToastViewport
Source§impl Debug for ToastViewport
impl Debug for ToastViewport
impl Eq for ToastViewport
Source§impl PartialEq for ToastViewport
impl PartialEq for ToastViewport
impl StructuralPartialEq for ToastViewport
Auto Trait Implementations§
impl Forget for ToastViewport
impl Freeze for ToastViewport
impl Move for ToastViewport
impl RefUnwindSafe for ToastViewport
impl Send for ToastViewport
impl Sync for ToastViewport
impl Unpin for ToastViewport
impl UnsafeUnpin for ToastViewport
impl UnwindSafe for ToastViewport
Blanket Implementations§
impl<T> Action for T
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.