pub struct UseServiceWorkerReturn<CheckFn, SkipFn>{
pub registration: Signal<Result<ServiceWorkerRegistration, ServiceWorkerRegistrationError>>,
pub installing: Signal<bool>,
pub waiting: Signal<bool>,
pub active: Signal<bool>,
pub check_for_update: CheckFn,
pub skip_waiting: SkipFn,
}
Expand description
Return type of use_service_worker
.
Fields§
§registration: Signal<Result<ServiceWorkerRegistration, ServiceWorkerRegistrationError>>
The current registration state.
installing: Signal<bool>
Whether a SW is currently installing.
waiting: Signal<bool>
Whether a SW was installed and is now awaiting activation.
active: Signal<bool>
Whether a SW is active.
check_for_update: CheckFn
Check for a ServiceWorker update.
skip_waiting: SkipFn
Call this to activate a new (“waiting”) SW if one is available.
Calling this while the UseServiceWorkerReturn::waiting
signal resolves to false has no effect.
Auto Trait Implementations§
impl<CheckFn, SkipFn> Freeze for UseServiceWorkerReturn<CheckFn, SkipFn>
impl<CheckFn, SkipFn> !RefUnwindSafe for UseServiceWorkerReturn<CheckFn, SkipFn>
impl<CheckFn, SkipFn> !Send for UseServiceWorkerReturn<CheckFn, SkipFn>
impl<CheckFn, SkipFn> !Sync for UseServiceWorkerReturn<CheckFn, SkipFn>
impl<CheckFn, SkipFn> Unpin for UseServiceWorkerReturn<CheckFn, SkipFn>
impl<CheckFn, SkipFn> !UnwindSafe for UseServiceWorkerReturn<CheckFn, SkipFn>
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