pub struct PushSubscription {
pub id: String,
pub device_client_id: String,
pub url: String,
pub keys: Option<PushKeys>,
pub verification_code: Option<String>,
pub expires: Option<DateTime<Utc>>,
pub types: Vec<String>,
pub verified: bool,
pub principal_id: String,
}Expand description
RFC 8620 §5.1 PushSubscription — a registered WebPush endpoint that the server notifies whenever the principal’s data changes.
Fields§
§id: StringServer-assigned unique identifier.
device_client_id: StringOpaque client-chosen identifier used to deduplicate registrations from the same device across sessions.
url: StringHTTPS URL of the push endpoint (RFC 8030).
keys: Option<PushKeys>Optional Web Crypto key material for encrypted push (RFC 8291).
When None, the server sends an unencrypted “tickle” (empty body).
verification_code: Option<String>Short-lived secret the server sends to the push endpoint for out-of-band verification. Held in memory only; never serialized to API responses.
expires: Option<DateTime<Utc>>RFC 3339 expiry. When Some and in the past the subscription is
silently dropped on the next delivery attempt.
types: Vec<String>Data-type names (e.g. "Email", "Mailbox") this subscription monitors.
An empty list means “all types”.
verified: boolWhether the subscription has been verified via the out-of-band verification push. Unverified subscriptions are never used for delivery. Not serialized — internal state only.
principal_id: StringThe account_id of the principal that owns this subscription.
Not serialized — internal state only.
Trait Implementations§
Source§impl Clone for PushSubscription
impl Clone for PushSubscription
Source§fn clone(&self) -> PushSubscription
fn clone(&self) -> PushSubscription
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PushSubscription
impl Debug for PushSubscription
Source§impl<'de> Deserialize<'de> for PushSubscription
impl<'de> Deserialize<'de> for PushSubscription
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>,
Source§impl From<&PushSubscription> for PushSubscriptionView
impl From<&PushSubscription> for PushSubscriptionView
Source§fn from(s: &PushSubscription) -> Self
fn from(s: &PushSubscription) -> Self
Auto Trait Implementations§
impl Freeze for PushSubscription
impl RefUnwindSafe for PushSubscription
impl Send for PushSubscription
impl Sync for PushSubscription
impl Unpin for PushSubscription
impl UnsafeUnpin for PushSubscription
impl UnwindSafe for PushSubscription
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request