pub trait StreamingClient {
type Error: Error;
// Required methods
fn subnote<E: SubNoteEvent>(
&self,
note_id: String,
) -> BoxFuture<'_, Result<SubNoteStream<'_, E, Self::Error>, Self::Error>>;
fn channel<R: ConnectChannelRequest>(
&self,
request: R,
) -> BoxFuture<'_, Result<ChannelStream<'_, R, Self::Error>, Self::Error>>;
fn broadcast<E: BroadcastEvent>(
&self,
) -> BoxFuture<'_, Result<BroadcastStream<'_, E, Self::Error>, Self::Error>>;
}Expand description
Abstraction over API clients with streaming connections.
Required Associated Types§
Required Methods§
Sourcefn subnote<E: SubNoteEvent>(
&self,
note_id: String,
) -> BoxFuture<'_, Result<SubNoteStream<'_, E, Self::Error>, Self::Error>>
fn subnote<E: SubNoteEvent>( &self, note_id: String, ) -> BoxFuture<'_, Result<SubNoteStream<'_, E, Self::Error>, Self::Error>>
Captures the note specified by note_id.
Sourcefn channel<R: ConnectChannelRequest>(
&self,
request: R,
) -> BoxFuture<'_, Result<ChannelStream<'_, R, Self::Error>, Self::Error>>
fn channel<R: ConnectChannelRequest>( &self, request: R, ) -> BoxFuture<'_, Result<ChannelStream<'_, R, Self::Error>, Self::Error>>
Connects to the channel using request.
Sourcefn broadcast<E: BroadcastEvent>(
&self,
) -> BoxFuture<'_, Result<BroadcastStream<'_, E, Self::Error>, Self::Error>>
fn broadcast<E: BroadcastEvent>( &self, ) -> BoxFuture<'_, Result<BroadcastStream<'_, E, Self::Error>, Self::Error>>
Receive messages from the broadcast stream.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.