[−]Struct gio::Notification
Notification is a mechanism for creating a notification to be shown
to the user -- typically as a pop-up notification presented by the
desktop environment shell.
The key difference between Notification and other similar APIs is
that, if supported by the desktop environment, notifications sent
with Notification will persist after the application has exited,
and even across system reboots.
Since the user may click on a notification while the application is
not running, applications using Notification should be able to be
started as a D-Bus service, using Application.
User interaction with a notification (either the default action, or buttons) must be associated with actions on the application (ie: "app." actions). It is not possible to route user interaction through the notification itself, because the object will not exist if the application is autostarted as a result of a notification being clicked.
A notification can be sent with ApplicationExt::send_notification.
Feature: v2_40
Implements
Methods
impl Notification[src]
impl Notificationpub fn new(title: &str) -> Notification[src]
pub fn new(title: &str) -> NotificationCreates a new Notification with title as its title.
After populating notification with more details, it can be sent to
the desktop shell with ApplicationExt::send_notification. Changing
any properties after this call will not have any effect until
resending notification.
Feature: v2_40
title
the title of the notification
Returns
a new Notification instance
Trait Implementations
impl<T: IsA<Object>> PartialOrd<T> for Notification
impl<T: IsA<Object>> PartialOrd<T> for Notificationfn partial_cmp(&self, other: &T) -> Option<Ordering>
fn partial_cmp(&self, other: &T) -> Option<Ordering>#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for Notification
impl Ord for Notificationfn cmp(&self, other: &Notification) -> Ordering
fn cmp(&self, other: &Notification) -> Orderingfn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl<T: IsA<Object>> PartialEq<T> for Notification
impl<T: IsA<Object>> PartialEq<T> for Notificationfn eq(&self, other: &T) -> bool
fn eq(&self, other: &T) -> bool#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Clone for Notification
impl Clone for Notificationfn clone(&self) -> Notification
fn clone(&self) -> Notificationfn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Eq for Notification
impl Eq for Notificationimpl Debug for Notification
impl Debug for Notificationimpl Hash for Notification
impl Hash for Notificationfn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl IsA<Object> for Notification
impl IsA<Object> for Notificationimpl StaticType for Notification
impl StaticType for Notificationfn static_type() -> Type
fn static_type() -> TypeAuto Trait Implementations
impl !Send for Notification
impl !Send for Notificationimpl !Sync for Notification
impl !Sync for NotificationBlanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut Timpl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<'a, T> ToGlibContainerFromSlice for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, [src]
impl<'a, T> ToGlibContainerFromSlice for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)[src]
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)[src]
fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)fn to_glib_full_from_slice(t: &[T]) -> *mut GArray[src]
fn to_glib_full_from_slice(t: &[T]) -> *mut GArrayimpl<'a, T> ToGlibContainerFromSlice for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, [src]
impl<'a, T> ToGlibContainerFromSlice for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)[src]
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)fn to_glib_container_from_slice(
_t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)[src]
fn to_glib_container_from_slice(
_t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)fn to_glib_full_from_slice(_t: &[T]) -> *const GList[src]
fn to_glib_full_from_slice(_t: &[T]) -> *const GListimpl<'a, T> ToGlibContainerFromSlice for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, [src]
impl<'a, T> ToGlibContainerFromSlice for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)[src]
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)[src]
fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)fn to_glib_full_from_slice(t: &[T]) -> *mut GList[src]
fn to_glib_full_from_slice(t: &[T]) -> *mut GListimpl<T> Cast for T where
T: IsA<Object>, [src]
impl<T> Cast for T where
T: IsA<Object>, fn upcast<T>(self) -> T where
Self: IsA<T>,
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper, [src]
fn upcast<T>(self) -> T where
Self: IsA<T>,
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper, Upcasts an object to a superclass or interface T. Read more
fn upcast_ref<T>(&self) -> &T where
Self: IsA<T>,
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper, [src]
fn upcast_ref<T>(&self) -> &T where
Self: IsA<T>,
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper, Upcasts an object to a reference of its superclass or interface T. Read more
fn downcast<T>(self) -> Result<T, Self> where
Self: Downcast<T>, [src]
fn downcast<T>(self) -> Result<T, Self> where
Self: Downcast<T>, Tries to downcast to a subclass or interface implementor T. Read more
fn downcast_ref<T>(&self) -> Option<&T> where
Self: Downcast<T>, [src]
fn downcast_ref<T>(&self) -> Option<&T> where
Self: Downcast<T>, Tries to downcast to a reference of its subclass or interface implementor T. Read more
fn is<T>(&self) -> bool where
T: StaticType, [src]
fn is<T>(&self) -> bool where
T: StaticType, Returns true if the object is an instance of (can be cast to) T.
fn dynamic_cast<T>(self) -> Result<T, Self> where
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper, [src]
fn dynamic_cast<T>(self) -> Result<T, Self> where
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper, Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
fn dynamic_cast_ref<T>(&self) -> Option<&T> where
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper, [src]
fn dynamic_cast_ref<T>(&self) -> Option<&T> where
T: StaticType + UnsafeFrom<ObjectRef> + Wrapper, Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
impl<T> IsA for T where
T: StaticType + Wrapper + Into<ObjectRef> + UnsafeFrom<ObjectRef> + ToGlibPtr<'a, *mut <T as Wrapper>::GlibType>, [src]
impl<T> IsA for T where
T: StaticType + Wrapper + Into<ObjectRef> + UnsafeFrom<ObjectRef> + ToGlibPtr<'a, *mut <T as Wrapper>::GlibType>, impl<Super, Sub> Downcast for Super where
Sub: IsA<Super>,
Super: IsA<Super>, [src]
impl<Super, Sub> Downcast for Super where
Sub: IsA<Super>,
Super: IsA<Super>, fn can_downcast(&self) -> bool[src]
fn can_downcast(&self) -> boolfn downcast(self) -> Result<Sub, Super>[src]
fn downcast(self) -> Result<Sub, Super>fn downcast_ref(&self) -> Option<&Sub>[src]
fn downcast_ref(&self) -> Option<&Sub>unsafe fn downcast_unchecked(self) -> Sub[src]
unsafe fn downcast_unchecked(self) -> Subunsafe fn downcast_ref_unchecked(&self) -> &Sub[src]
unsafe fn downcast_ref_unchecked(&self) -> &Subimpl<T> ObjectExt for T where
T: IsA<Object> + SetValue, [src]
impl<T> ObjectExt for T where
T: IsA<Object> + SetValue, fn get_type(&self) -> Type[src]
fn get_type(&self) -> Typefn set_property<'a, N>(
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError> where
N: Into<&'a str>, [src]
fn set_property<'a, N>(
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError> where
N: Into<&'a str>, fn get_property<'a, N>(&self, property_name: N) -> Result<Value, BoolError> where
N: Into<&'a str>, [src]
fn get_property<'a, N>(&self, property_name: N) -> Result<Value, BoolError> where
N: Into<&'a str>, fn block_signal(&self, handler_id: &SignalHandlerId)[src]
fn block_signal(&self, handler_id: &SignalHandlerId)fn unblock_signal(&self, handler_id: &SignalHandlerId)[src]
fn unblock_signal(&self, handler_id: &SignalHandlerId)fn stop_signal_emission(&self, signal_name: &str)[src]
fn stop_signal_emission(&self, signal_name: &str)fn disconnect(&self, handler_id: SignalHandlerId)[src]
fn disconnect(&self, handler_id: SignalHandlerId)fn connect_notify<'a, P, F>(&self, name: P, f: F) -> SignalHandlerId where
F: 'static + Send + Sync + Fn(&T, &ParamSpec),
P: Into<Option<&'a str>>, [src]
fn connect_notify<'a, P, F>(&self, name: P, f: F) -> SignalHandlerId where
F: 'static + Send + Sync + Fn(&T, &ParamSpec),
P: Into<Option<&'a str>>, fn notify<'a, N>(&self, property_name: N) where
N: Into<&'a str>, [src]
fn notify<'a, N>(&self, property_name: N) where
N: Into<&'a str>, fn notify_by_pspec(&self, pspec: &ParamSpec)[src]
fn notify_by_pspec(&self, pspec: &ParamSpec)fn has_property<'a, N>(
&self,
property_name: N,
type_: Option<Type>
) -> Result<(), BoolError> where
N: Into<&'a str>, [src]
fn has_property<'a, N>(
&self,
property_name: N,
type_: Option<Type>
) -> Result<(), BoolError> where
N: Into<&'a str>, fn get_property_type<'a, N>(&self, property_name: N) -> Option<Type> where
N: Into<&'a str>, [src]
fn get_property_type<'a, N>(&self, property_name: N) -> Option<Type> where
N: Into<&'a str>, fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec> where
N: Into<&'a str>, [src]
fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec> where
N: Into<&'a str>, fn list_properties(&self) -> Vec<ParamSpec>[src]
fn list_properties(&self) -> Vec<ParamSpec>fn connect<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
N: Into<&'a str>, [src]
fn connect<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
N: Into<&'a str>, fn emit<'a, N>(
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>, [src]
fn emit<'a, N>(
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>, fn downgrade(&self) -> WeakRef<T>[src]
fn downgrade(&self) -> WeakRef<T>fn bind_property<'a, O, N, M>(
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a, T, O> where
M: Into<&'a str>,
N: Into<&'a str>,
O: IsA<Object>, [src]
fn bind_property<'a, O, N, M>(
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a, T, O> where
M: Into<&'a str>,
N: Into<&'a str>,
O: IsA<Object>, fn ref_count(&self) -> u32[src]
fn ref_count(&self) -> u32impl<T> ToValue for T where
T: SetValue + ?Sized, [src]
impl<T> ToValue for T where
T: SetValue + ?Sized,