pub struct Alert { /* private fields */ }Expand description
A semantic message box for displaying status information
Implementations§
Source§impl Alert
impl Alert
Sourcepub fn new(kind: AlertKind, message: impl Into<String>) -> Self
pub fn new(kind: AlertKind, message: impl Into<String>) -> Self
Create a new alert with the given kind and message
Sourcepub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
Set the alert title
Sourcepub fn dismissible(self, dismissible: bool) -> Self
pub fn dismissible(self, dismissible: bool) -> Self
Make the alert dismissible
Sourcepub fn show(self, ui: &mut Ui) -> AlertResponse
pub fn show(self, ui: &mut Ui) -> AlertResponse
Show the alert
Auto Trait Implementations§
impl Freeze for Alert
impl RefUnwindSafe for Alert
impl Send for Alert
impl Sync for Alert
impl Unpin for Alert
impl UnsafeUnpin for Alert
impl UnwindSafe for Alert
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more