Skip to main content

RuntimeExecutionPort

Trait RuntimeExecutionPort 

Source
pub trait RuntimeExecutionPort: Send + Sync {
    // Required methods
    fn register_route<'life0, 'async_trait>(
        &'life0 self,
        definition: RouteDefinition,
    ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn start_route<'life0, 'life1, 'async_trait>(
        &'life0 self,
        route_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn stop_route<'life0, 'life1, 'async_trait>(
        &'life0 self,
        route_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn suspend_route<'life0, 'life1, 'async_trait>(
        &'life0 self,
        route_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn resume_route<'life0, 'life1, 'async_trait>(
        &'life0 self,
        route_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn reload_route<'life0, 'life1, 'async_trait>(
        &'life0 self,
        route_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove_route<'life0, 'life1, 'async_trait>(
        &'life0 self,
        route_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn in_flight_count<'life0, 'life1, 'async_trait>(
        &'life0 self,
        route_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<InFlightCountResult, DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn list_endpoints<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn routes_for_endpoint<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _uri: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn health_check_endpoint<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _uri: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<HealthStatus, DomainError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn register_route<'life0, 'async_trait>( &'life0 self, definition: RouteDefinition, ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn start_route<'life0, 'life1, 'async_trait>( &'life0 self, route_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn stop_route<'life0, 'life1, 'async_trait>( &'life0 self, route_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn suspend_route<'life0, 'life1, 'async_trait>( &'life0 self, route_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn resume_route<'life0, 'life1, 'async_trait>( &'life0 self, route_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn reload_route<'life0, 'life1, 'async_trait>( &'life0 self, route_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn remove_route<'life0, 'life1, 'async_trait>( &'life0 self, route_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn in_flight_count<'life0, 'life1, 'async_trait>( &'life0 self, route_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<InFlightCountResult, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn list_endpoints<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all registered endpoint URIs across all routes.

Default implementation returns an empty list. Adapters should override to return actual endpoint URIs once endpoint tracking is implemented.

Source

fn routes_for_endpoint<'life0, 'life1, 'async_trait>( &'life0 self, _uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return all route_ids that consume from the given source endpoint URI.

Default implementation returns an empty vector (source-compatible for external implementations that do not track endpoints).

Source

fn health_check_endpoint<'life0, 'life1, 'async_trait>( &'life0 self, _uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<HealthStatus, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the worst HealthStatus across all routes owning the endpoint.

Default implementation returns an endpoint-not-found error (source-compatible).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§