HistoryObserver
public protocol HistoryObserver : AnyObject, Sendable
A HistoryObserver is notified whenever a new history client is created.
-
historyClientCreated(conversationId:Asynchronoussecret: ) This function will be called every time a new history client is created.
The
secretparameter is the secret associated with the new history client.Warning: this function must not block. Foreign implementors can spawn a task, send on a channel, or take any other non-blocking approach, as long as the operation completes quickly.
Though the signature includes an error type, that error is only present because it is required by
uniffiin order to handle panics. This function should suppress and ignore internal errors instead of propagating them, to the maximum extent possible.Declaration
Swift
func historyClientCreated(conversationId: ConversationId, secret: HistorySecret) async throws