pub struct ShowOptions { /* private fields */ }
Expand description
Options for UseWebNotificationReturn::show
.
This can be used to override options passed to use_web_notification
.
See MDN Docs for more info.
The following implementations are missing:
Implementations§
Source§impl ShowOptions
impl ShowOptions
Sourcepub fn title<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>,
) -> Self
pub fn title<OptionInnerType>( self, value: impl Into<Option<OptionInnerType>>, ) -> Self
The title property of the Notification interface indicates the title of the notification
Sourcepub fn body<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>,
) -> Self
pub fn body<OptionInnerType>( self, value: impl Into<Option<OptionInnerType>>, ) -> Self
The body string of the notification as specified in the constructor’s options parameter.
Sourcepub fn direction<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>,
) -> Selfwhere
OptionInnerType: Into<NotificationDirection>,
pub fn direction<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>,
) -> Selfwhere
OptionInnerType: Into<NotificationDirection>,
The text direction of the notification as specified in the constructor’s
options parameter. Can be LeftToRight
, RightToLeft
or Auto
(default).
See web_sys::NotificationDirection
for more info.
Sourcepub fn language<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>,
) -> Self
pub fn language<OptionInnerType>( self, value: impl Into<Option<OptionInnerType>>, ) -> Self
The language code of the notification as specified in the constructor’s options parameter.
Sourcepub fn tag<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>,
) -> Self
pub fn tag<OptionInnerType>( self, value: impl Into<Option<OptionInnerType>>, ) -> Self
The ID of the notification(if any) as specified in the constructor’s options parameter.
Sourcepub fn icon<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>,
) -> Self
pub fn icon<OptionInnerType>( self, value: impl Into<Option<OptionInnerType>>, ) -> Self
The URL of the image used as an icon of the notification as specified in the constructor’s options parameter.
Sourcepub fn image<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>,
) -> Self
pub fn image<OptionInnerType>( self, value: impl Into<Option<OptionInnerType>>, ) -> Self
The URL of the image to be displayed as part of the notification as specified in the constructor’s options parameter.
Sourcepub fn require_interaction<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>,
) -> Self
pub fn require_interaction<OptionInnerType>( self, value: impl Into<Option<OptionInnerType>>, ) -> Self
A boolean value indicating that a notification should remain active until the user clicks or dismisses it, rather than closing automatically.
Sourcepub fn renotify<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>,
) -> Self
pub fn renotify<OptionInnerType>( self, value: impl Into<Option<OptionInnerType>>, ) -> Self
A boolean value specifying whether the user should be notified after a new notification replaces an old one.
The default is false
, which means they won’t be notified. If true
, then tag
also must be set.
Sourcepub fn silent<OptionInnerType>(
self,
value: impl Into<Option<OptionInnerType>>,
) -> Self
pub fn silent<OptionInnerType>( self, value: impl Into<Option<OptionInnerType>>, ) -> Self
A boolean value specifying whether the notification should be silent, regardless of the device settings.
The default is null
, which means the notification is not silent. If true
, then the notification will be silent.
Trait Implementations§
Source§impl Default for ShowOptions
impl Default for ShowOptions
Source§fn default() -> ShowOptions
fn default() -> ShowOptions
Auto Trait Implementations§
impl Freeze for ShowOptions
impl RefUnwindSafe for ShowOptions
impl Send for ShowOptions
impl Sync for ShowOptions
impl Unpin for ShowOptions
impl UnwindSafe for ShowOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more