mirror of
https://github.com/hyperoslo/Cache.git
synced 2026-04-07 19:17:36 +00:00
12 lines
250 B
Swift
12 lines
250 B
Swift
public final class ObservationToken {
|
|
private let cancellationClosure: () -> Void
|
|
|
|
init(cancellationClosure: @escaping () -> Void) {
|
|
self.cancellationClosure = cancellationClosure
|
|
}
|
|
|
|
public func cancel() {
|
|
cancellationClosure()
|
|
}
|
|
}
|