[][src]Trait misskey_core::streaming::StreamingClient

pub trait StreamingClient {
    type Error: Error;
    pub fn subnote<E: SubNoteEvent>(
        &self,
        note_id: String
    ) -> BoxFuture<'_, Result<SubNoteStream<'_, E, Self::Error>, Self::Error>>;
pub fn channel<R: ConnectChannelRequest>(
        &self,
        request: R
    ) -> BoxFuture<'_, Result<ChannelStream<'_, R, Self::Error>, Self::Error>>;
pub fn broadcast<E: BroadcastEvent>(
        &self
    ) -> BoxFuture<'_, Result<BroadcastStream<'_, E, Self::Error>, Self::Error>>; }

Abstraction over API clients with streaming connections.

Associated Types

type Error: Error[src]

The error type produced by the client when an error occurs.

Loading content...

Required methods

pub fn subnote<E: SubNoteEvent>(
    &self,
    note_id: String
) -> BoxFuture<'_, Result<SubNoteStream<'_, E, Self::Error>, Self::Error>>
[src]

Captures the note specified by note_id.

pub fn channel<R: ConnectChannelRequest>(
    &self,
    request: R
) -> BoxFuture<'_, Result<ChannelStream<'_, R, Self::Error>, Self::Error>>
[src]

Connects to the channel using request.

pub fn broadcast<E: BroadcastEvent>(
    &self
) -> BoxFuture<'_, Result<BroadcastStream<'_, E, Self::Error>, Self::Error>>
[src]

Receive messages from the broadcast stream.

Loading content...

Implementations on Foreign Types

impl<C: ?Sized, '_> StreamingClient for &'_ C where
    C: StreamingClient
[src]

type Error = C::Error

impl<C: ?Sized, '_> StreamingClient for &'_ mut C where
    C: StreamingClient
[src]

type Error = C::Error

impl<C: ?Sized> StreamingClient for Box<C> where
    C: StreamingClient
[src]

type Error = C::Error

Loading content...

Implementors

Loading content...