pub struct AwsEventHandler<T, R>{ /* private fields */ }Expand description
Generic struct for AWS Event Handlers.
Implementations§
Source§impl<T: AwsEvent, R: Debug + Serialize> AwsEventHandler<T, R>
impl<T: AwsEvent, R: Debug + Serialize> AwsEventHandler<T, R>
Sourcepub fn new(
handler: Box<dyn Fn(LambdaEvent<T>) -> LambdaFuture<R> + Send + Sync>,
) -> Self
pub fn new( handler: Box<dyn Fn(LambdaEvent<T>) -> LambdaFuture<R> + Send + Sync>, ) -> Self
Constructs a new AwsEventHandler.
Trait Implementations§
Source§impl<T: AwsEvent, R: Debug + Serialize> Callable<R> for AwsEventHandler<T, R>
impl<T: AwsEvent, R: Debug + Serialize> Callable<R> for AwsEventHandler<T, R>
Source§fn call(&self, event: LambdaEvent<Value>) -> LambdaFuture<R>
fn call(&self, event: LambdaEvent<Value>) -> LambdaFuture<R>
Calls the event handler for an AWS Lambda event.
Auto Trait Implementations§
impl<T, R> Freeze for AwsEventHandler<T, R>
impl<T, R> !RefUnwindSafe for AwsEventHandler<T, R>
impl<T, R> Send for AwsEventHandler<T, R>
impl<T, R> Sync for AwsEventHandler<T, R>
impl<T, R> Unpin for AwsEventHandler<T, R>where
T: Unpin,
impl<T, R> !UnwindSafe for AwsEventHandler<T, R>
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