Skip to main content

code

Function code 

Source
pub fn code(
    title: &str,
    body: &str,
    copy: Option<(String, Box<dyn FnOnce() + Send>)>,
) -> Result<(), String>
Expand description

Shows a code: title says what and from whom, body the code and how long it lasts. No sound. With copy, the notification offers a button labelled with its text, and its action runs when the button is pressed; the notification then lives on its own thread, which waits for the button.