pub trait AbstractChannels: Sync + Send {
// 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_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 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§
Sourcefn 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 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
Sourcefn 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_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
Sourcefn 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 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
Sourcefn 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_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
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,
Sourcefn 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 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
Sourcefn 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 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