pub struct Notification {
    pub message_type: u32,
    pub index: u32,
    pub timeout: f32,
    pub height: f32,
    pub opacity: f32,
    pub volume: f32,
    pub audio_path: String,
    pub title: String,
    pub content: String,
    pub use_base64_icon: bool,
    pub icon: String,
    pub source_app: String,
}
Expand description

Fields

message_type: u32

1 = Notification Popup, 2 = MediaPlayer Information, will be extended later on.

index: u32

Only used for Media Player, changes the icon on the wrist.

timeout: f32

How long the notification will stay on screen for in seconds

height: f32

Height notification will expand to if it has content other than a title. Default is 175

opacity: f32

Opacity of the notification, to make it less intrusive. Setting to 0 will set to 1.

volume: f32

Notification sound volume.

audio_path: String

File path to .ogg audio file. Can be “default”, “error”, or “warning”. Notification will be silent if left empty.

title: String

Notification title, supports Rich Text Formatting

content: String

Notification content, supports Rich Text Formatting, if left empty, notification will be small.

use_base64_icon: bool

Set to true if using Base64 for the icon image

icon: String

Base64 Encoded image, or file path to image. Can also be “default”, “error”, or “warning”

source_app: String

Somewhere to put your app name for debugging purposes

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.