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
silent
image
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.
Trait Implementations§
source§impl Default for ShowOptions
impl Default for ShowOptions
source§fn default() -> ShowOptions
fn default() -> ShowOptions
Returns the “default value” for a type. Read more
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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