Instance Methodmochidev.swift-webpush 0.4.2WebPush
encode(to:)
WebPushManager.swift:944func encode(to encoder: any Encoder) throws
func encode(to encoder: any Encoder) throws
s7WebPush0aB7ManagerC10ExpirationV6encode2toys7Encoder_p_tKF
What are these?3QUAW
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.
protocol Encoder
A type that can encode values into a native format for external representation.
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 hours(_ hours: Int) -> WebPushManager.Expiration
Make an expiration with a number of hours.
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