Михаил Капелько 10 mesi fa
parent
commit
34a63c92b3
1 ha cambiato i file con 16 aggiunte e 0 eliminazioni
  1. +16
    -0
      src/Bus.Processor.swift

+ 16
- 0
src/Bus.Processor.swift Vedi File

@@ -0,0 +1,16 @@
import Combine

public extension Bus {
final class Processor<Src, Dst> {
var subscriptions = [AnyCancellable]()

public init(
_ keyIn: String,
_ keyOut: String,
_ handler: @escaping ((Src) -> Dst?),
opt: [Option] = []
) {
Bus.process(keyIn, keyOut, handler, opt: opt, sub: &subscriptions)
}
}
}

Loading…
Annulla
Salva