Expand description
§Product OS : Capabilities
Product OS : Capabilities provides a modular system for implementing server features and services.
§Features
- Feature Registry: Register and route HTTP features with path-based matching
- Service Registry: Manage lifecycle of background services
- Trait-based Architecture: Define features and services through traits
- Mutable & Immutable Patterns: Support both shared and exclusive access patterns
- Error Handling: Typed errors for robust error handling
§Example
use product_os_capabilities::{Feature, Service, Features, Services};
// Create registries
let mut features = Features::new();
let mut services = Services::new();
let mut router = ProductOSRouter::new();
// Register features and services (implementations not shown)
// features.add(my_feature, "/api".to_string(), &mut router).await?;
// services.add(my_service).await;Structs§
- Default
Feature - Default feature implementation
- Default
Service - Default service implementation
- Features
- Feature registry for managing HTTP route-based features
- Registry
Feature - A feature registered in the feature registry
- Registry
Service - A service registered in the service registry
- Services
- Service registry for managing background services
Enums§
- Feature
Error - Errors that can occur when working with features
- Service
Error - Errors that can occur when working with services
- What
- Represents a characteristic or ID-based action selector for service calls
Traits§
Functions§
- now_
millis - Returns the current time as milliseconds since the Unix epoch.