Static Methodmochidev.swift-webpush 0.4.2WebPush
hours(_:)
Make an expiration with a number of hours.
static func hours(_ hours: Int) -> WebPushManager.Expiration
Make an expiration with a number of hours.
static func hours(_ hours: Int) -> WebPushManager.Expiration
import WebPush
struct Expiration
A duration in seconds used to express when push messages will expire.
actor WebPushManager
A manager for sending push messages to subscribers.
@frozen struct Int
A signed integer value type.
init(from decoder: Decoder) throws
init(integerLiteral value: Int)
init(seconds: Int)
Initialize an expiration with a number of seconds.
static let dropIfUndeliverable: Self
The message will be delivered immediately, otherwise it’ll be dropped.
static let recommendedMaximum: Self
The recommended maximum expiration duration push services are expected to support.
static func days(_ days: Int) -> WebPushManager.Expiration
Make an expiration with a number of days.
static func minutes(_ minutes: Int) -> WebPushManager.Expiration
Make an expiration with a number of minutes.
static func seconds(_ seconds: Int) -> WebPushManager.Expiration
Make an expiration with a number of seconds.
let seconds: Int
The number of seconds represented by this expiration.
static func + (lhs: Self, rhs: Self) -> WebPushManager.Expiration
static func - (lhs: Self, rhs: Self) -> WebPushManager.Expiration
static func < (lhs: Self, rhs: Self) -> Bool
func encode(to encoder: any Encoder) throws