XmtpMlsClient

Trait XmtpMlsClient 

Source
pub trait XmtpMlsClient: MaybeSend + MaybeSync {
    type Error: RetryableError + MaybeSend + MaybeSync + 'static;

    // Required methods
    fn upload_key_package<'life0, 'async_trait>(
        &'life0 self,
        request: UploadKeyPackageRequest,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn fetch_key_packages<'life0, 'async_trait>(
        &'life0 self,
        request: FetchKeyPackagesRequest,
    ) -> Pin<Box<dyn Future<Output = Result<FetchKeyPackagesResponse, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send_group_messages<'life0, 'async_trait>(
        &'life0 self,
        request: SendGroupMessagesRequest,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send_welcome_messages<'life0, 'async_trait>(
        &'life0 self,
        request: SendWelcomeMessagesRequest,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query_group_messages<'life0, 'async_trait>(
        &'life0 self,
        group_id: GroupId,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<GroupMessage>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query_latest_group_message<'life0, 'async_trait>(
        &'life0 self,
        group_id: GroupId,
    ) -> Pin<Box<dyn Future<Output = Result<Option<GroupMessage>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query_welcome_messages<'life0, 'async_trait>(
        &'life0 self,
        installation_key: InstallationId,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<WelcomeMessage>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn publish_commit_log<'life0, 'async_trait>(
        &'life0 self,
        request: BatchPublishCommitLogRequest,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query_commit_log<'life0, 'async_trait>(
        &'life0 self,
        request: BatchQueryCommitLogRequest,
    ) -> Pin<Box<dyn Future<Output = Result<BatchQueryCommitLogResponse, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_newest_group_message<'life0, 'async_trait>(
        &'life0 self,
        request: GetNewestGroupMessageRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<GroupMessageMetadata>>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

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

Required Associated Types§

Required Methods§

Source

fn upload_key_package<'life0, 'async_trait>( &'life0 self, request: UploadKeyPackageRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_key_packages<'life0, 'async_trait>( &'life0 self, request: FetchKeyPackagesRequest, ) -> Pin<Box<dyn Future<Output = Result<FetchKeyPackagesResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn send_group_messages<'life0, 'async_trait>( &'life0 self, request: SendGroupMessagesRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn send_welcome_messages<'life0, 'async_trait>( &'life0 self, request: SendWelcomeMessagesRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn query_group_messages<'life0, 'async_trait>( &'life0 self, group_id: GroupId, ) -> Pin<Box<dyn Future<Output = Result<Vec<GroupMessage>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn query_latest_group_message<'life0, 'async_trait>( &'life0 self, group_id: GroupId, ) -> Pin<Box<dyn Future<Output = Result<Option<GroupMessage>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn query_welcome_messages<'life0, 'async_trait>( &'life0 self, installation_key: InstallationId, ) -> Pin<Box<dyn Future<Output = Result<Vec<WelcomeMessage>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn publish_commit_log<'life0, 'async_trait>( &'life0 self, request: BatchPublishCommitLogRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn query_commit_log<'life0, 'async_trait>( &'life0 self, request: BatchQueryCommitLogRequest, ) -> Pin<Box<dyn Future<Output = Result<BatchQueryCommitLogResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_newest_group_message<'life0, 'async_trait>( &'life0 self, request: GetNewestGroupMessageRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<GroupMessageMetadata>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

Source§

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

Source§

type Error = <T as XmtpMlsClient>::Error

Source§

fn upload_key_package<'life0, 'async_trait>( &'life0 self, request: UploadKeyPackageRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn fetch_key_packages<'life0, 'async_trait>( &'life0 self, request: FetchKeyPackagesRequest, ) -> Pin<Box<dyn Future<Output = Result<FetchKeyPackagesResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_group_messages<'life0, 'async_trait>( &'life0 self, request: SendGroupMessagesRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_welcome_messages<'life0, 'async_trait>( &'life0 self, request: SendWelcomeMessagesRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn query_group_messages<'life0, 'async_trait>( &'life0 self, group_id: GroupId, ) -> Pin<Box<dyn Future<Output = Result<Vec<GroupMessage>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn query_latest_group_message<'life0, 'async_trait>( &'life0 self, group_id: GroupId, ) -> Pin<Box<dyn Future<Output = Result<Option<GroupMessage>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn query_welcome_messages<'life0, 'async_trait>( &'life0 self, installation_key: InstallationId, ) -> Pin<Box<dyn Future<Output = Result<Vec<WelcomeMessage>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn publish_commit_log<'life0, 'async_trait>( &'life0 self, request: BatchPublishCommitLogRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn query_commit_log<'life0, 'async_trait>( &'life0 self, request: BatchQueryCommitLogRequest, ) -> Pin<Box<dyn Future<Output = Result<BatchQueryCommitLogResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_newest_group_message<'life0, 'async_trait>( &'life0 self, request: GetNewestGroupMessageRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<GroupMessageMetadata>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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

Source§

type Error = <T as XmtpMlsClient>::Error

Source§

fn upload_key_package<'life0, 'async_trait>( &'life0 self, request: UploadKeyPackageRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn fetch_key_packages<'life0, 'async_trait>( &'life0 self, request: FetchKeyPackagesRequest, ) -> Pin<Box<dyn Future<Output = Result<FetchKeyPackagesResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_group_messages<'life0, 'async_trait>( &'life0 self, request: SendGroupMessagesRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_welcome_messages<'life0, 'async_trait>( &'life0 self, request: SendWelcomeMessagesRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn query_group_messages<'life0, 'async_trait>( &'life0 self, group_id: GroupId, ) -> Pin<Box<dyn Future<Output = Result<Vec<GroupMessage>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn query_latest_group_message<'life0, 'async_trait>( &'life0 self, group_id: GroupId, ) -> Pin<Box<dyn Future<Output = Result<Option<GroupMessage>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn query_welcome_messages<'life0, 'async_trait>( &'life0 self, installation_key: InstallationId, ) -> Pin<Box<dyn Future<Output = Result<Vec<WelcomeMessage>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn publish_commit_log<'life0, 'async_trait>( &'life0 self, request: BatchPublishCommitLogRequest, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn query_commit_log<'life0, 'async_trait>( &'life0 self, request: BatchQueryCommitLogRequest, ) -> Pin<Box<dyn Future<Output = Result<BatchQueryCommitLogResponse, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_newest_group_message<'life0, 'async_trait>( &'life0 self, request: GetNewestGroupMessageRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<GroupMessageMetadata>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§