pub trait AbstractMessages: Sync + Send {
// Required methods
fn insert_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 Message,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn fetch_message<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Message>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn fetch_messages<'life0, 'async_trait>(
&'life0 self,
query: MessageQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fetch_messages_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
message: &'life2 PartialMessage,
remove: Vec<FieldsMessage>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn append_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
append: &'life2 AppendMessage,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn add_reaction<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
emoji: &'life2 str,
user: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn remove_reaction<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
emoji: &'life2 str,
user: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn clear_reaction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
emoji: &'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_message<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_messages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
channel: &'life1 str,
ids: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}
Required Methods§
Sourcefn insert_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 Message,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 Message,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Insert a new message into the database
Sourcefn fetch_message<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Message>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_message<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Message>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a message by its id
Sourcefn fetch_messages<'life0, 'async_trait>(
&'life0 self,
query: MessageQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_messages<'life0, 'async_trait>(
&'life0 self,
query: MessageQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch multiple messages by given query
Sourcefn fetch_messages_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_messages_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch multiple messages by given IDs
Sourcefn update_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
message: &'life2 PartialMessage,
remove: Vec<FieldsMessage>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
message: &'life2 PartialMessage,
remove: Vec<FieldsMessage>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Update a given message with new information
Sourcefn append_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
append: &'life2 AppendMessage,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn append_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
append: &'life2 AppendMessage,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Append information to a given message
Sourcefn add_reaction<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
emoji: &'life2 str,
user: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn add_reaction<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
emoji: &'life2 str,
user: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Add a new reaction to a message
Sourcefn remove_reaction<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
emoji: &'life2 str,
user: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn remove_reaction<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
id: &'life1 str,
emoji: &'life2 str,
user: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Remove a reaction from a message
Sourcefn clear_reaction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
emoji: &'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 clear_reaction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
emoji: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove reaction from a message
Sourcefn delete_message<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_message<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a message from the database by its id
Sourcefn delete_messages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
channel: &'life1 str,
ids: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_messages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
channel: &'life1 str,
ids: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete messages from a channel by their ids and corresponding channel id