myc-core 8.3.0+beta

Provide base features of the Mycelium project as s and Use-cases.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::domain::dtos::message::{MessageSendingEvent, MessageStatus};

use async_trait::async_trait;
use mycelium_base::{
    entities::FetchManyResponseKind, utils::errors::MappedErrors,
};
use shaku::Interface;

#[async_trait]
pub trait LocalMessageReading: Interface + Send + Sync {
    async fn list_oldest_messages(
        &self,
        tail_size: i32,
        status: MessageStatus,
    ) -> Result<FetchManyResponseKind<MessageSendingEvent>, MappedErrors>;
}