made-core 0.7.4

Domain core of MADE: entities, value objects, events, ports. No IO.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use async_trait::async_trait;

use crate::error::DomainError;
use crate::ports::CeremonyInstanceIdPage;
use crate::value_objects::{CeremonyId, CeremonyIdPrefix, CeremonyInstancePageLimit};

/// Keyset access to ceremony stream identities without loading their journals.
#[async_trait]
pub trait CeremonyInstanceIndexPort: Send + Sync {
    /// Return ids strictly above `after`, ordered by id and optionally restricted
    /// to a literal prefix. Implementations fetch at most `limit + 1` rows.
    async fn ids_after(
        &self,
        after: Option<&CeremonyId>,
        id_prefix: Option<&CeremonyIdPrefix>,
        limit: CeremonyInstancePageLimit,
    ) -> Result<CeremonyInstanceIdPage, DomainError>;
}