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.
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) -> SubscriptionInfowhere
S: Into<String>,
pub fn new<S>(endpoint: S, p256dh: S, auth: S) -> SubscriptionInfowhere
S: Into<String>,
A constructor function to create a new SubscriptionInfo
, if not using
Serde’s serialization.
Trait Implementations§
source§impl Debug for SubscriptionInfo
impl Debug for SubscriptionInfo
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