Struct web_push::PartialVapidSignatureBuilder [−][src]
pub struct PartialVapidSignatureBuilder { /* fields omitted */ }Expand description
A VapidSignatureBuilder without VAPID subscription info.
Example
use web_push::{VapidSignatureBuilder, SubscriptionInfo};
let builder = VapidSignatureBuilder::from_pem_no_sub("Some PEM".as_bytes()).unwrap();
//Clone builder for each use of the same private key
{
//Pretend this changes for each connection
let subscription_info = SubscriptionInfo::new(
"https://updates.push.services.mozilla.com/wpush/v1/...",
"BLMbF9ffKBiWQLCKvTHb6LO8Nb6dcUh6TItC455vu2kElga6PQvUmaFyCdykxY2nOSSL3yKgfbmFLRTUaGv4yV8",
"xS03Fi5ErfTNH_l9WHE9Ig"
);
let builder = builder.clone();
let sig = builder.add_sub_info(&subscription_info).build();
//Sign message ect.
}
Implementations
pub fn add_sub_info(
self,
subscription_info: &'a SubscriptionInfo
) -> VapidSignatureBuilder<'_>
pub fn add_sub_info(
self,
subscription_info: &'a SubscriptionInfo
) -> VapidSignatureBuilder<'_>
Adds the VAPID subscription info for a particular client.
Gets the uncompressed public key bytes derived from the private key used for this VAPID signature.
Base64 encode these bytes to get the key to send to the client.
Trait Implementations
Auto Trait Implementations
impl Send for PartialVapidSignatureBuilder
impl Sync for PartialVapidSignatureBuilder
impl Unpin for PartialVapidSignatureBuilder
impl UnwindSafe for PartialVapidSignatureBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more