import Combine public extension Bus { final class Receiver { var subscriptions = [AnyCancellable]() public init( _ keys: Set, _ handler: @escaping ((String, T) -> Void), opt: [Option] = [] ) { Bus.receive(keys, handler, opt: opt, sub: &subscriptions) } } } import Combine public extension Bus { final class Sender { var subscriptions = [AnyCancellable]() public init( _ key: String, _ node: AnyPublisher, opt: [Option] = [] ) { Bus.send(key, node, opt: opt, sub: &subscriptions) } } }