#[non_exhaustive]pub struct Message {
pub text: String,
pub kind: MessageKind,
pub seconds: Option<f64>,
pub action: Option<(String, Rc<dyn Fn()>)>,
pub on_close: Option<Rc<dyn Fn()>>,
}Expand description
Something to tell people, which goes away by itself.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text: StringWhat it says.
kind: MessageKindHow much it matters.
seconds: Option<f64>How long it shows; nothing means the usual.
action: Option<(String, Rc<dyn Fn()>)>A button on it: what it says and what it does. It closes the message.
on_close: Option<Rc<dyn Fn()>>What happens once it goes away, by itself or closed by a person.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Message
impl !Send for Message
impl !Sync for Message
impl !UnwindSafe for Message
impl Freeze for Message
impl Unpin for Message
impl UnsafeUnpin for Message
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