Struct web_push::SubscriptionInfo
source · pub struct SubscriptionInfo {
pub endpoint: String,
pub keys: SubscriptionKeys,
}
Expand description
Client info for sending the notification. Maps the values from browser’s subscription info JSON data (AKA pushSubscription object).
Client pushSubscription objects can be directly deserialized into this struct using serde.
Fields§
§endpoint: String
The endpoint URI for sending the notification.
keys: SubscriptionKeys
The encryption key and secret for payload encryption.
Implementations§
source§impl SubscriptionInfo
impl SubscriptionInfo
sourcepub fn new<S>(endpoint: S, p256dh: S, auth: S) -> SubscriptionInfo
pub fn new<S>(endpoint: S, p256dh: S, auth: S) -> SubscriptionInfo
A constructor function to create a new SubscriptionInfo
, if not using
Serde’s serialization.
Trait Implementations§
source§impl Clone for SubscriptionInfo
impl Clone for SubscriptionInfo
source§fn clone(&self) -> SubscriptionInfo
fn clone(&self) -> SubscriptionInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SubscriptionInfo
impl Debug for SubscriptionInfo
source§impl Default for SubscriptionInfo
impl Default for SubscriptionInfo
source§fn default() -> SubscriptionInfo
fn default() -> SubscriptionInfo
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for SubscriptionInfo
impl<'de> Deserialize<'de> for SubscriptionInfo
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
source§impl Hash for SubscriptionInfo
impl Hash for SubscriptionInfo
source§impl Ord for SubscriptionInfo
impl Ord for SubscriptionInfo
source§fn cmp(&self, other: &SubscriptionInfo) -> Ordering
fn cmp(&self, other: &SubscriptionInfo) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SubscriptionInfo
impl PartialEq for SubscriptionInfo
source§fn eq(&self, other: &SubscriptionInfo) -> bool
fn eq(&self, other: &SubscriptionInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SubscriptionInfo
impl PartialOrd for SubscriptionInfo
source§fn partial_cmp(&self, other: &SubscriptionInfo) -> Option<Ordering>
fn partial_cmp(&self, other: &SubscriptionInfo) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for SubscriptionInfo
impl Serialize for SubscriptionInfo
impl Eq for SubscriptionInfo
impl StructuralEq for SubscriptionInfo
impl StructuralPartialEq for SubscriptionInfo
Auto Trait Implementations§
impl RefUnwindSafe for SubscriptionInfo
impl Send for SubscriptionInfo
impl Sync for SubscriptionInfo
impl Unpin for SubscriptionInfo
impl UnwindSafe for SubscriptionInfo
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