pub async fn message(
        &self,
        channel_id: ChannelId,
        message_id: MessageId,
    ) -> Result<Option<Arc<CachedMessage>>> {
        let channels = self.0.messages.lock().await;
        let channel = match channels.get(&channel_id) {
            Some(channel) => channel,
            None => return Ok(None),
        };

        Ok(channel.get(&message_id).cloned())
    }
/// Gets a message by channel ID and message ID.
///
/// This is an O(log n) operation.
Gets a message by channel ID and message ID.
This is an O(log n) operation.
Gets a message by channel ID and message ID . This is an O ( log n ) operation .
pub async fn message(
        &self,
        channel_id: ChannelId,
        message_id: MessageId,
    ) -> Result<Option<Arc<CachedMessage>>> {
        let channels = self.0.messages.lock().await;
        let channel = match channels.get(&channel_id) {
            Some(channel) => channel,
            None => return Ok(None),
        };
        Ok(channel.get(&message_id).cloned())
    }
pub async fn message ( & self , channel_id : ChannelId , message_id : MessageId , ) -> Result < Option < Arc < CachedMessage > > > { let channels = self . 0 . messages . lock ( ) . await ; let channel = match channels . get ( & channel_id ) { Some ( channel ) => channel , None => return Ok ( None ) , } ; Ok ( channel . get ( & message_id ) . cloned ( ) ) }
Gets a message by channel ID and message ID.
Gets a message by channel ID and message ID .
&self
channel_id
ChannelId
message_id
MessageId
&self
channel_id
ChannelId
message_id
MessageId