pub trait SqsHandler:
Send
+ Sync
+ 'static {
// Required method
fn handle_operation(
&self,
op: SqsOperation,
body: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Response<SqsResponseBody>, SqsError>> + Send>>;
}Expand description
Trait that the SQS business logic provider must implement.
The handler receives a parsed operation enum and the raw JSON body bytes, and returns a complete HTTP response. This trait serves as the boundary between the HTTP transport layer and the business logic layer.
Required Methods§
Sourcefn handle_operation(
&self,
op: SqsOperation,
body: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Response<SqsResponseBody>, SqsError>> + Send>>
fn handle_operation( &self, op: SqsOperation, body: Bytes, ) -> Pin<Box<dyn Future<Output = Result<Response<SqsResponseBody>, SqsError>> + Send>>
Handle an SQS operation and produce an HTTP response.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".