Struct libnotify::Context [] [src]

pub struct Context;

The context which within libnotify operates.

Only one context can exist at a time.


impl Context

fn new(app_name: &str) -> Result<Context, ContextCreationError>

Create a new context


  • app_name: The name of the application using the context

fn new_notification(&self, summary: &str, body: Option<&str>, icon: Option<&str>) -> Result<Notification, NotificationCreationError>

Creates a new Notification.


  • summary: Required summary text
  • body: Optional body text
  • icon: Optional icon theme icon name or filename

fn show(&self, summary: &str, body: Option<&str>, icon: Option<&str>) -> Result<(), Box<Error>>

Show a notification.

This is a convenience method that creates a new notification, and shows it in one step.

Trait Implementations

impl Drop for Context

fn drop(&mut self)