Struct xsoverlay_notifications::Notification
source · [−]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
sourceimpl Clone for Notification
impl Clone for Notification
sourcefn clone(&self) -> Notification
fn clone(&self) -> Notification
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Notification
impl Debug for Notification
sourceimpl Default for Notification
impl Default for Notification
sourceimpl Serialize for Notification
impl Serialize for Notification
Auto Trait Implementations
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnwindSafe for Notification
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more