Skip to main content

BoxError

Type Alias BoxError 

Source
pub type BoxError = Box<dyn Error + Send + Sync>;
Expand description

Boxed error type: Box<dyn std::error::Error + Send + Sync>.

This is the error type handler and step closures return.

§Examples

use aws_durable_execution_sdk as durable;

async fn handler(
    _event: serde_json::Value,
    ctx: durable::DurableContext,
) -> Result<String, durable::BoxError> {
    let value = ctx.step(|_| async { Ok(42) }).await?;
    Ok(format!("got {value}"))
}

Aliased Type§

pub struct BoxError(/* private fields */);