Expand description
Tower integration - Layer and Service implementations (requires tower feature)
Tower integration for error-rail.
This module provides Tower Layer and Service implementations
that automatically attach error context to service errors.
§Feature Flag
Requires the tower feature:
[dependencies]
error-rail = { version = "0.8", features = ["tower"] }§Example
ⓘ
use error_rail::tower::ErrorRailLayer;
use tower::ServiceBuilder;
let service = ServiceBuilder::new()
.layer(ErrorRailLayer::new("api-gateway"))
.service(my_service);Structs§
- Error
Rail Future - Future returned by
ErrorRailService. - Error
Rail Layer - A Tower
Layerthat wraps service errors inComposableErrorwith context. - Error
Rail Service - A Tower
Servicethat wraps errors inComposableErrorwith context.
Traits§
- Service
Error Ext - Extension trait for easily wrapping services with error context.