[][src]Struct web_sys::ServiceWorkerRegistration

#[repr(transparent)]pub struct ServiceWorkerRegistration { /* fields omitted */ }

The ServiceWorkerRegistration class.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

Methods

impl ServiceWorkerRegistration[src]

pub fn installing(&self) -> Option<ServiceWorker>[src]

Getter for the installing field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorker, ServiceWorkerRegistration

impl ServiceWorkerRegistration[src]

pub fn waiting(&self) -> Option<ServiceWorker>[src]

Getter for the waiting field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorker, ServiceWorkerRegistration

impl ServiceWorkerRegistration[src]

pub fn active(&self) -> Option<ServiceWorker>[src]

Getter for the active field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorker, ServiceWorkerRegistration

impl ServiceWorkerRegistration[src]

pub fn scope(&self) -> String[src]

Getter for the scope field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

impl ServiceWorkerRegistration[src]

pub fn update_via_cache(&self) -> Result<ServiceWorkerUpdateViaCache, JsValue>[src]

Getter for the updateViaCache field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration, ServiceWorkerUpdateViaCache

impl ServiceWorkerRegistration[src]

pub fn onupdatefound(&self) -> Option<Function>[src]

Getter for the onupdatefound field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

impl ServiceWorkerRegistration[src]

pub fn set_onupdatefound(&self, value: Option<&Function>)[src]

Setter for the onupdatefound field of this object.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

impl ServiceWorkerRegistration[src]

pub fn push_manager(&self) -> Result<PushManager, JsValue>[src]

Getter for the pushManager field of this object.

MDN Documentation

This API requires the following crate features to be activated: PushManager, ServiceWorkerRegistration

impl ServiceWorkerRegistration[src]

pub fn get_notifications(&self) -> Result<Promise, JsValue>[src]

The getNotifications() method.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

impl ServiceWorkerRegistration[src]

pub fn get_notifications_with_filter(
    &self,
    filter: &GetNotificationOptions
) -> Result<Promise, JsValue>
[src]

The getNotifications() method.

MDN Documentation

This API requires the following crate features to be activated: GetNotificationOptions, ServiceWorkerRegistration

impl ServiceWorkerRegistration[src]

pub fn show_notification(&self, title: &str) -> Result<Promise, JsValue>[src]

The showNotification() method.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

impl ServiceWorkerRegistration[src]

pub fn show_notification_with_options(
    &self,
    title: &str,
    options: &NotificationOptions
) -> Result<Promise, JsValue>
[src]

The showNotification() method.

MDN Documentation

This API requires the following crate features to be activated: NotificationOptions, ServiceWorkerRegistration

impl ServiceWorkerRegistration[src]

pub fn unregister(&self) -> Result<Promise, JsValue>[src]

The unregister() method.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

impl ServiceWorkerRegistration[src]

pub fn update(&self) -> Result<Promise, JsValue>[src]

The update() method.

MDN Documentation

This API requires the following crate features to be activated: ServiceWorkerRegistration

Methods from Deref<Target = EventTarget>

pub fn add_event_listener_with_callback(
    &self,
    type_: &str,
    listener: &Function
) -> Result<(), JsValue>
[src]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

pub fn add_event_listener_with_event_listener(
    &self,
    type_: &str,
    listener: &EventListener
) -> Result<(), JsValue>
[src]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventListener, EventTarget

pub fn add_event_listener_with_callback_and_add_event_listener_options(
    &self,
    type_: &str,
    listener: &Function,
    options: &AddEventListenerOptions
) -> Result<(), JsValue>
[src]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: AddEventListenerOptions, EventTarget

pub fn add_event_listener_with_event_listener_and_add_event_listener_options(
    &self,
    type_: &str,
    listener: &EventListener,
    options: &AddEventListenerOptions
) -> Result<(), JsValue>
[src]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: AddEventListenerOptions, EventListener, EventTarget

pub fn add_event_listener_with_callback_and_bool(
    &self,
    type_: &str,
    listener: &Function,
    options: bool
) -> Result<(), JsValue>
[src]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

pub fn add_event_listener_with_event_listener_and_bool(
    &self,
    type_: &str,
    listener: &EventListener,
    options: bool
) -> Result<(), JsValue>
[src]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventListener, EventTarget

pub fn add_event_listener_with_callback_and_add_event_listener_options_and_wants_untrusted(
    &self,
    type_: &str,
    listener: &Function,
    options: &AddEventListenerOptions,
    wants_untrusted: Option<bool>
) -> Result<(), JsValue>
[src]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: AddEventListenerOptions, EventTarget

pub fn add_event_listener_with_event_listener_and_add_event_listener_options_and_wants_untrusted(
    &self,
    type_: &str,
    listener: &EventListener,
    options: &AddEventListenerOptions,
    wants_untrusted: Option<bool>
) -> Result<(), JsValue>
[src]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: AddEventListenerOptions, EventListener, EventTarget

pub fn add_event_listener_with_callback_and_bool_and_wants_untrusted(
    &self,
    type_: &str,
    listener: &Function,
    options: bool,
    wants_untrusted: Option<bool>
) -> Result<(), JsValue>
[src]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

pub fn add_event_listener_with_event_listener_and_bool_and_wants_untrusted(
    &self,
    type_: &str,
    listener: &EventListener,
    options: bool,
    wants_untrusted: Option<bool>
) -> Result<(), JsValue>
[src]

The addEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventListener, EventTarget

pub fn dispatch_event(&self, event: &Event) -> Result<bool, JsValue>[src]

The dispatchEvent() method.

MDN Documentation

This API requires the following crate features to be activated: Event, EventTarget

pub fn remove_event_listener_with_callback(
    &self,
    type_: &str,
    listener: &Function
) -> Result<(), JsValue>
[src]

The removeEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

pub fn remove_event_listener_with_event_listener(
    &self,
    type_: &str,
    listener: &EventListener
) -> Result<(), JsValue>
[src]

The removeEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventListener, EventTarget

pub fn remove_event_listener_with_callback_and_event_listener_options(
    &self,
    type_: &str,
    listener: &Function,
    options: &EventListenerOptions
) -> Result<(), JsValue>
[src]

The removeEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventListenerOptions, EventTarget

pub fn remove_event_listener_with_event_listener_and_event_listener_options(
    &self,
    type_: &str,
    listener: &EventListener,
    options: &EventListenerOptions
) -> Result<(), JsValue>
[src]

The removeEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventListener, EventListenerOptions, EventTarget

pub fn remove_event_listener_with_callback_and_bool(
    &self,
    type_: &str,
    listener: &Function,
    options: bool
) -> Result<(), JsValue>
[src]

The removeEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventTarget

pub fn remove_event_listener_with_event_listener_and_bool(
    &self,
    type_: &str,
    listener: &EventListener,
    options: bool
) -> Result<(), JsValue>
[src]

The removeEventListener() method.

MDN Documentation

This API requires the following crate features to be activated: EventListener, EventTarget

Trait Implementations

impl AsRef<EventTarget> for ServiceWorkerRegistration[src]

impl AsRef<JsValue> for ServiceWorkerRegistration[src]

impl AsRef<Object> for ServiceWorkerRegistration[src]

impl AsRef<ServiceWorkerRegistration> for ServiceWorkerRegistration[src]

impl Clone for ServiceWorkerRegistration[src]

impl Debug for ServiceWorkerRegistration[src]

impl Deref for ServiceWorkerRegistration[src]

type Target = EventTarget

The resulting type after dereferencing.

impl Eq for ServiceWorkerRegistration[src]

impl From<JsValue> for ServiceWorkerRegistration[src]

impl From<ServiceWorkerRegistration> for JsValue[src]

impl From<ServiceWorkerRegistration> for EventTarget[src]

impl From<ServiceWorkerRegistration> for Object[src]

impl FromWasmAbi for ServiceWorkerRegistration[src]

type Abi = <JsValue as FromWasmAbi>::Abi

The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more

impl IntoWasmAbi for ServiceWorkerRegistration[src]

type Abi = <JsValue as IntoWasmAbi>::Abi

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl<'a> IntoWasmAbi for &'a ServiceWorkerRegistration[src]

type Abi = <&'a JsValue as IntoWasmAbi>::Abi

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl JsCast for ServiceWorkerRegistration[src]

impl OptionFromWasmAbi for ServiceWorkerRegistration[src]

impl OptionIntoWasmAbi for ServiceWorkerRegistration[src]

impl<'a> OptionIntoWasmAbi for &'a ServiceWorkerRegistration[src]

impl PartialEq<ServiceWorkerRegistration> for ServiceWorkerRegistration[src]

impl RefFromWasmAbi for ServiceWorkerRegistration[src]

type Abi = <JsValue as RefFromWasmAbi>::Abi

The wasm ABI type references to Self are recovered from.

type Anchor = ManuallyDrop<ServiceWorkerRegistration>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don't persist beyond one function call, and so that they remain anonymous. Read more

impl StructuralEq for ServiceWorkerRegistration[src]

impl StructuralPartialEq for ServiceWorkerRegistration[src]

impl WasmDescribe for ServiceWorkerRegistration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.