pub struct LambdaA2aServerBuilder { /* private fields */ }Expand description
Builder for Lambda A2A handler.
Use .storage(my_storage) to supply a single backend implementing all storage traits.
This satisfies ADR-009’s same-backend requirement and enables streaming via durable
event store.
Implementations§
Source§impl LambdaA2aServerBuilder
impl LambdaA2aServerBuilder
pub fn new() -> Self
pub fn executor(self, exec: impl AgentExecutor + 'static) -> Self
Sourcepub fn storage<S>(self, storage: S) -> Selfwhere
S: A2aTaskStorage + A2aPushNotificationStorage + A2aEventStore + A2aAtomicStore + Clone + 'static,
pub fn storage<S>(self, storage: S) -> Selfwhere
S: A2aTaskStorage + A2aPushNotificationStorage + A2aEventStore + A2aAtomicStore + Clone + 'static,
Set all storage from a single backend instance.
This is the preferred method — a single struct implementing all storage traits guarantees the same-backend requirement (ADR-009).
Sourcepub fn task_storage(self, s: impl A2aTaskStorage + 'static) -> Self
pub fn task_storage(self, s: impl A2aTaskStorage + 'static) -> Self
Set task storage individually. Must be paired with event_store/atomic_store for same-backend compliance.
Sourcepub fn push_storage(self, s: impl A2aPushNotificationStorage + 'static) -> Self
pub fn push_storage(self, s: impl A2aPushNotificationStorage + 'static) -> Self
Set push notification storage individually.
Sourcepub fn event_store(self, s: impl A2aEventStore + 'static) -> Self
pub fn event_store(self, s: impl A2aEventStore + 'static) -> Self
Set event store individually. Must match task_storage backend.
Sourcepub fn atomic_store(self, s: impl A2aAtomicStore + 'static) -> Self
pub fn atomic_store(self, s: impl A2aAtomicStore + 'static) -> Self
Set atomic store individually. Must match task_storage backend.
pub fn middleware(self, mw: Arc<dyn A2aMiddleware>) -> Self
pub fn build(self) -> Result<LambdaA2aHandler, A2aError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LambdaA2aServerBuilder
impl !RefUnwindSafe for LambdaA2aServerBuilder
impl Send for LambdaA2aServerBuilder
impl Sync for LambdaA2aServerBuilder
impl Unpin for LambdaA2aServerBuilder
impl UnsafeUnpin for LambdaA2aServerBuilder
impl !UnwindSafe for LambdaA2aServerBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more