Struct winrt_notification::Toast
[−]
[src]
pub struct Toast { /* fields omitted */ }
Methods
impl Toast
[src]
fn new(app_id: &str) -> Toast
[src]
Constructor for the toast builder
app_id is used in the toast to inform the user where it came from.
fn title(self, content: &str) -> Toast
[src]
Sets the title of the toast.
Will be white. Supports Unicode ✓
fn text1(self, content: &str) -> Toast
[src]
Add/Sets the first line of text below title.
Will be grey. Supports Unicode ✓
fn text2(self, content: &str) -> Toast
[src]
Add/Sets the second line of text below title.
Will be grey. Supports Unicode ✓
fn duration(self, duration: Duration) -> Toast
[src]
Set the length of time to show the toast
fn icon(self, source: &Path, crop: IconCrop, alt_text: &str) -> Toast
[src]
Set the icon shown in the upper left of the toast
The default is supposed to be determined by your app id. In practice it will be blank.
fn hero(self, source: &Path, alt_text: &str) -> Toast
[src]
Add/Set a Hero image for the toast.
This will be above the toast text and the icon.
fn image(self, source: &Path, alt_text: &str) -> Toast
[src]
Add an image to the toast
May be done many times. Will appear below text.
fn sound(self, src: Option<Sound>) -> Toast
[src]
Set the sound for the toast or silence it
Default is Sound::IM
fn show(&self) -> Result<(), Error>
[src]
Display the toast on the screen