XmtpMlsStreams

Trait XmtpMlsStreams 

Source
pub trait XmtpMlsStreams: MaybeSend + MaybeSync {
    type GroupMessageStream: Stream<Item = Result<GroupMessage, Self::Error>> + MaybeSend;
    type WelcomeMessageStream: Stream<Item = Result<WelcomeMessage, Self::Error>> + MaybeSend;
    type Error: RetryableError + 'static;

    // Required methods
    fn subscribe_group_messages<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        group_ids: &'life1 [&'life2 GroupId],
    ) -> Pin<Box<dyn Future<Output = Result<Self::GroupMessageStream, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn subscribe_group_messages_with_cursors<'life0, 'life1, 'async_trait>(
        &'life0 self,
        groups_with_cursors: &'life1 TopicCursor,
    ) -> Pin<Box<dyn Future<Output = Result<Self::GroupMessageStream, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn subscribe_welcome_messages<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        installations: &'life1 [&'life2 InstallationId],
    ) -> Pin<Box<dyn Future<Output = Result<Self::WelcomeMessageStream, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Represents the backend API required for an MLS Delivery Service to be compatible with XMTP streaming

Required Associated Types§

Required Methods§

Source

fn subscribe_group_messages<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, group_ids: &'life1 [&'life2 GroupId], ) -> Pin<Box<dyn Future<Output = Result<Self::GroupMessageStream, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn subscribe_group_messages_with_cursors<'life0, 'life1, 'async_trait>( &'life0 self, groups_with_cursors: &'life1 TopicCursor, ) -> Pin<Box<dyn Future<Output = Result<Self::GroupMessageStream, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn subscribe_welcome_messages<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, installations: &'life1 [&'life2 InstallationId], ) -> Pin<Box<dyn Future<Output = Result<Self::WelcomeMessageStream, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementations on Foreign Types§

Source§

impl<T> XmtpMlsStreams for Box<T>
where T: XmtpMlsStreams + Sync + ?Sized,

Source§

type Error = <T as XmtpMlsStreams>::Error

Source§

type GroupMessageStream = <T as XmtpMlsStreams>::GroupMessageStream

Source§

type WelcomeMessageStream = <T as XmtpMlsStreams>::WelcomeMessageStream

Source§

fn subscribe_group_messages<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, group_ids: &'life1 [&'life2 GroupId], ) -> Pin<Box<dyn Future<Output = Result<Self::GroupMessageStream, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn subscribe_group_messages_with_cursors<'life0, 'life1, 'async_trait>( &'life0 self, groups_with_cursors: &'life1 TopicCursor, ) -> Pin<Box<dyn Future<Output = Result<Self::GroupMessageStream, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn subscribe_welcome_messages<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, installations: &'life1 [&'life2 InstallationId], ) -> Pin<Box<dyn Future<Output = Result<Self::WelcomeMessageStream, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

impl<T> XmtpMlsStreams for Arc<T>
where T: XmtpMlsStreams + ?Sized,

Source§

type Error = <T as XmtpMlsStreams>::Error

Source§

type GroupMessageStream = <T as XmtpMlsStreams>::GroupMessageStream

Source§

type WelcomeMessageStream = <T as XmtpMlsStreams>::WelcomeMessageStream

Source§

fn subscribe_group_messages<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, group_ids: &'life1 [&'life2 GroupId], ) -> Pin<Box<dyn Future<Output = Result<Self::GroupMessageStream, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn subscribe_group_messages_with_cursors<'life0, 'life1, 'async_trait>( &'life0 self, groups_with_cursors: &'life1 TopicCursor, ) -> Pin<Box<dyn Future<Output = Result<Self::GroupMessageStream, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn subscribe_welcome_messages<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, installations: &'life1 [&'life2 InstallationId], ) -> Pin<Box<dyn Future<Output = Result<Self::WelcomeMessageStream, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§