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: u321 = Notification Popup, 2 = MediaPlayer Information, will be extended later on.
index: u32Only used for Media Player, changes the icon on the wrist.
timeout: f32How long the notification will stay on screen for in seconds
height: f32Height notification will expand to if it has content other than a title. Default is 175
opacity: f32Opacity of the notification, to make it less intrusive. Setting to 0 will set to 1.
volume: f32Notification sound volume.
audio_path: StringFile path to .ogg audio file. Can be “default”, “error”, or “warning”. Notification will be silent if left empty.
title: StringNotification title, supports Rich Text Formatting
content: StringNotification content, supports Rich Text Formatting, if left empty, notification will be small.
use_base64_icon: boolSet to true if using Base64 for the icon image
icon: StringBase64 Encoded image, or file path to image. Can also be “default”, “error”, or “warning”
source_app: StringSomewhere 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