Struct web_push::WebPushMessageBuilder[][src]

pub struct WebPushMessageBuilder<'a> { /* fields omitted */ }
Expand description

The main class for creating a notification payload.

Implementations

Creates a builder for generating the web push payload.

All parameters are from the subscription info given by browser when subscribing to push notifications.

How long the server should keep the message if it cannot be delivered currently. If not set, the message is deleted immediately on failed delivery.

Add a VAPID signature to the request. To be generated with the VapidSignatureBuilder.

If set, the client will get content in the notification. Has a maximum size of 3800 characters.

Currently, Aes128Gcm is the recommended and only encoding standard implemented.

Builds and if set, encrypts the payload. Any errors due to bad encryption will be WebPushError::Unspecified, meaning something was wrong in the given public key or authentication. You can further debug these issues by checking the API responses visible with log::trace level.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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