Instance Methodmochidev.swift-webpush 0.4.2WebPush
encode(to:)
Topic.swift:85func encode(to encoder: any Encoder) throws
func encode(to encoder: any Encoder) throws
import WebPush
struct Topic
Topics are used to de-duplicate and overwrite messages on push services before they are delivered to a subscriber.
protocol Encoder
A type that can encode values into a native format for external representation.
init()
Create a new random topic.
init(encodableTopic: some Encodable, salt: some DataProtocol) throws
Create a new topic from encodable data and a salt.
init(from decoder: any Decoder) throws
init(unsafeTopic: String)
Initialize a topic with an unchecked string.
var description: String { get }
let topic: String
The topic value to use.