energy_api/directory/mod.rs
1//! EDI-Energy Directory Service v1 (Verzeichnisdienst).
2//!
3//! The directory is the central registry for all EDI-Energy API-Webdienste.
4//! API providers register their endpoint URLs here; consumers look them up
5//! before making calls.
6//!
7//! This module covers both transport protocols:
8//! - **REST** (`directoryServiceV1.yaml`) — [`DirectoryServiceClient`] and
9//! the [`server`] router factory.
10//! - **WebSocket** (`webSocketV1.yaml`) — [`DirectoryWsClient`] real-time
11//! subscription client.
12//!
13//! ## Feature flags
14//!
15//! | Feature | What it enables |
16//! |-------------|------------------------------------------------------|
17//! | `client` | [`DirectoryServiceClient`] — REST client |
18//! | `websocket` | [`DirectoryWsClient`] — WebSocket subscription client|
19//! | `server` | [`server`] module — axum router + handler trait |
20
21// Re-export all directory types so callers can `use energy_api::directory::*`.
22pub use crate::models::directory::*;
23
24#[cfg(feature = "client")]
25mod client;
26#[cfg(feature = "client")]
27pub use client::DirectoryServiceClient;
28
29#[cfg(feature = "websocket")]
30mod ws;
31#[cfg(feature = "websocket")]
32pub use ws::{DirectoryWsClient, SubscriptionSender};
33
34#[cfg(feature = "server")]
35pub mod server;