Struct leptos_use::ShowOptions
source · 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:
vibrate
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 false
, 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