// Copyright (C) 2021-2022 The apca Developers
// SPDX-License-Identifier: GPL-3.0-or-later
useasync_trait::async_trait;usecrate::Error;/// A trait representing "something" that users can subscribe to to
/// receive updates through a stream.
#[async_trait]pubtraitSubscribable{/// Input required to establish a connection.
typeInput;/// The type of the subscription being provided.
typeSubscription;/// The output stream.
typeStream;/// Establish a connection to receive updates and return a stream
/// along with a subscription to control the stream, if applicable.
async fnconnect(input:&Self::Input)->Result<(Self::Stream, Self::Subscription), Error>;}