pub struct BackgroundServiceEvent<'a> { /* private fields */ }Implementations§
Source§impl<'a> BackgroundServiceEvent<'a>
impl<'a> BackgroundServiceEvent<'a>
Sourcepub fn builder(
timestamp: TimeSinceEpoch,
origin: impl Into<Cow<'a, str>>,
service_worker_registration_id: RegistrationID<'a>,
service: impl Into<ServiceName>,
event_name: impl Into<Cow<'a, str>>,
instance_id: impl Into<Cow<'a, str>>,
event_metadata: Vec<EventMetadata<'a>>,
storage_key: impl Into<Cow<'a, str>>,
) -> BackgroundServiceEventBuilder<'a>
pub fn builder( timestamp: TimeSinceEpoch, origin: impl Into<Cow<'a, str>>, service_worker_registration_id: RegistrationID<'a>, service: impl Into<ServiceName>, event_name: impl Into<Cow<'a, str>>, instance_id: impl Into<Cow<'a, str>>, event_metadata: Vec<EventMetadata<'a>>, storage_key: impl Into<Cow<'a, str>>, ) -> BackgroundServiceEventBuilder<'a>
Creates a builder for this type with the required parameters:
timestamp: Timestamp of the event (in seconds).origin: The origin this event belongs to.service_worker_registration_id: The Service Worker ID that initiated the event.service: The Background Service this event belongs to.event_name: A description of the event.instance_id: An identifier that groups related events together.event_metadata: A list of event-specific information.storage_key: Storage key this event belongs to.
Sourcepub fn timestamp(&self) -> &TimeSinceEpoch
pub fn timestamp(&self) -> &TimeSinceEpoch
Timestamp of the event (in seconds).
Sourcepub fn service_worker_registration_id(&self) -> &RegistrationID<'a>
pub fn service_worker_registration_id(&self) -> &RegistrationID<'a>
The Service Worker ID that initiated the event.
Sourcepub fn service(&self) -> &ServiceName
pub fn service(&self) -> &ServiceName
The Background Service this event belongs to.
Sourcepub fn event_name(&self) -> &str
pub fn event_name(&self) -> &str
A description of the event.
Sourcepub fn instance_id(&self) -> &str
pub fn instance_id(&self) -> &str
An identifier that groups related events together.
Sourcepub fn event_metadata(&self) -> &[EventMetadata<'a>]
pub fn event_metadata(&self) -> &[EventMetadata<'a>]
A list of event-specific information.
Sourcepub fn storage_key(&self) -> &str
pub fn storage_key(&self) -> &str
Storage key this event belongs to.
Trait Implementations§
Source§impl<'a> Clone for BackgroundServiceEvent<'a>
impl<'a> Clone for BackgroundServiceEvent<'a>
Source§fn clone(&self) -> BackgroundServiceEvent<'a>
fn clone(&self) -> BackgroundServiceEvent<'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 BackgroundServiceEvent<'a>
impl<'a> Debug for BackgroundServiceEvent<'a>
Source§impl<'a> Default for BackgroundServiceEvent<'a>
impl<'a> Default for BackgroundServiceEvent<'a>
Source§fn default() -> BackgroundServiceEvent<'a>
fn default() -> BackgroundServiceEvent<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for BackgroundServiceEvent<'a>
impl<'de, 'a> Deserialize<'de> for BackgroundServiceEvent<'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 BackgroundServiceEvent<'a>
impl<'a> RefUnwindSafe for BackgroundServiceEvent<'a>
impl<'a> Send for BackgroundServiceEvent<'a>
impl<'a> Sync for BackgroundServiceEvent<'a>
impl<'a> Unpin for BackgroundServiceEvent<'a>
impl<'a> UnsafeUnpin for BackgroundServiceEvent<'a>
impl<'a> UnwindSafe for BackgroundServiceEvent<'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