pub struct Toasts { /* private fields */ }
Implementations§
Source§impl Toasts
impl Toasts
pub fn new() -> Self
Sourcepub fn with_id(id: Id) -> Self
pub fn with_id(id: Id) -> Self
Create a new Toasts
instance with a custom id
This can be useful if you want to have multiple toast groups in the same UI.
Sourcepub fn position(self, position: impl Into<Pos2>) -> Self
pub fn position(self, position: impl Into<Pos2>) -> Self
Position where the toasts show up.
The toasts will start from this position and stack up
in the direction specified with Self::direction
.
Sourcepub fn anchor(self, anchor: Align2, offset: impl Into<Pos2>) -> Self
pub fn anchor(self, anchor: Align2, offset: impl Into<Pos2>) -> Self
Anchor for the toasts.
For instance, if you set this to (10.0, 10.0) and Align2::LEFT_TOP
,
then (10.0, 10.0) will be the top-left corner of the first toast.
Sourcepub fn direction(self, direction: impl Into<Direction>) -> Self
pub fn direction(self, direction: impl Into<Direction>) -> Self
Direction where the toasts stack up
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Toasts
impl !RefUnwindSafe for Toasts
impl Send for Toasts
impl Sync for Toasts
impl Unpin for Toasts
impl !UnwindSafe for Toasts
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