Skip to main content

AbstractChannels

Trait AbstractChannels 

Source
pub trait AbstractChannels: Sync + Send {
Show 13 methods // Required methods fn insert_channel<'life0, 'life1, 'async_trait>( &'life0 self, channel: &'life1 Channel, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn fetch_channel<'life0, 'life1, 'async_trait>( &'life0 self, channel_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Channel>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn fetch_channels<'a, 'life0, 'async_trait>( &'life0 self, ids: &'a [String], ) -> Pin<Box<dyn Future<Output = Result<Vec<Channel>>> + Send + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait; fn find_direct_messages<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Channel>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn find_group_message_channels<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ChunkedDatabaseGenerator<Channel>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn find_saved_messages_channel<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Channel>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn find_direct_message_channel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, user_a: &'life1 str, user_b: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Channel>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn add_user_to_group<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, channel_id: &'life1 str, user_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn set_channel_role_permission<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, channel_id: &'life1 str, role_id: &'life2 str, permissions: OverrideField, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn update_channel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, channel_id: &'life2 PartialChannel, remove: Vec<FieldsChannel>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn remove_user_from_group<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, channel_id: &'life1 str, user_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn remove_user_from_groups<'life0, 'life1, 'async_trait>( &'life0 self, channel_ids: Vec<String>, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_channel<'life0, 'life1, 'async_trait>( &'life0 self, channel_id: &'life1 Channel, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait;
}

Required Methods§

Source

fn insert_channel<'life0, 'life1, 'async_trait>( &'life0 self, channel: &'life1 Channel, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Insert a new channel in the database

Source

fn fetch_channel<'life0, 'life1, 'async_trait>( &'life0 self, channel_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Channel>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch a channel from the database

Source

fn fetch_channels<'a, 'life0, 'async_trait>( &'life0 self, ids: &'a [String], ) -> Pin<Box<dyn Future<Output = Result<Vec<Channel>>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Fetch all channels from the database

Source

fn find_direct_messages<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Channel>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch all direct messages for a user

Source

fn find_group_message_channels<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<ChunkedDatabaseGenerator<Channel>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn find_saved_messages_channel<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Channel>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn find_direct_message_channel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, user_a: &'life1 str, user_b: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Channel>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn add_user_to_group<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, channel_id: &'life1 str, user_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Insert a user to a group

Source

fn set_channel_role_permission<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, channel_id: &'life1 str, role_id: &'life2 str, permissions: OverrideField, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Insert channel role permissions

Source

fn update_channel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, channel_id: &'life2 PartialChannel, remove: Vec<FieldsChannel>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn remove_user_from_group<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, channel_id: &'life1 str, user_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn remove_user_from_groups<'life0, 'life1, 'async_trait>( &'life0 self, channel_ids: Vec<String>, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn delete_channel<'life0, 'life1, 'async_trait>( &'life0 self, channel_id: &'life1 Channel, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§