pub struct ServiceWorkerVersion<'a> { /* private fields */ }Expand description
ServiceWorker version.
Implementations§
Source§impl<'a> ServiceWorkerVersion<'a>
impl<'a> ServiceWorkerVersion<'a>
Sourcepub fn builder(
version_id: impl Into<Cow<'a, str>>,
registration_id: impl Into<RegistrationID<'a>>,
script_url: impl Into<Cow<'a, str>>,
running_status: impl Into<ServiceWorkerVersionRunningStatus>,
status: impl Into<ServiceWorkerVersionStatus>,
) -> ServiceWorkerVersionBuilder<'a>
pub fn builder( version_id: impl Into<Cow<'a, str>>, registration_id: impl Into<RegistrationID<'a>>, script_url: impl Into<Cow<'a, str>>, running_status: impl Into<ServiceWorkerVersionRunningStatus>, status: impl Into<ServiceWorkerVersionStatus>, ) -> ServiceWorkerVersionBuilder<'a>
Creates a builder for this type with the required parameters:
version_id:registration_id:script_url:running_status:status:
pub fn version_id(&self) -> &str
pub fn registration_id(&self) -> &RegistrationID<'a>
pub fn script_url(&self) -> &str
pub fn running_status(&self) -> &ServiceWorkerVersionRunningStatus
pub fn status(&self) -> &ServiceWorkerVersionStatus
Sourcepub fn script_last_modified(&self) -> Option<f64>
pub fn script_last_modified(&self) -> Option<f64>
The Last-Modified header value of the main script.
Sourcepub fn script_response_time(&self) -> Option<f64>
pub fn script_response_time(&self) -> Option<f64>
The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated.
pub fn controlled_clients(&self) -> Option<&[TargetID<'a>]>
pub fn target_id(&self) -> Option<&TargetID<'a>>
pub fn router_rules(&self) -> Option<&str>
Trait Implementations§
Source§impl<'a> Clone for ServiceWorkerVersion<'a>
impl<'a> Clone for ServiceWorkerVersion<'a>
Source§fn clone(&self) -> ServiceWorkerVersion<'a>
fn clone(&self) -> ServiceWorkerVersion<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ServiceWorkerVersion<'a>
impl<'a> Debug for ServiceWorkerVersion<'a>
Source§impl<'a> Default for ServiceWorkerVersion<'a>
impl<'a> Default for ServiceWorkerVersion<'a>
Source§fn default() -> ServiceWorkerVersion<'a>
fn default() -> ServiceWorkerVersion<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for ServiceWorkerVersion<'a>
impl<'de, 'a> Deserialize<'de> for ServiceWorkerVersion<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for ServiceWorkerVersion<'a>
impl<'a> RefUnwindSafe for ServiceWorkerVersion<'a>
impl<'a> Send for ServiceWorkerVersion<'a>
impl<'a> Sync for ServiceWorkerVersion<'a>
impl<'a> Unpin for ServiceWorkerVersion<'a>
impl<'a> UnsafeUnpin for ServiceWorkerVersion<'a>
impl<'a> UnwindSafe for ServiceWorkerVersion<'a>
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