pub struct LambdaErrorHandler { /* private fields */ }Expand description
Lambda-specific error handling pipeline with automatic conversion from Python errors
Implementations§
Source§impl LambdaErrorHandler
impl LambdaErrorHandler
pub fn new() -> LambdaErrorHandler
pub fn with_strategy( self, strategy: ErrorHandlingStrategy, ) -> LambdaErrorHandler
Sourcepub fn generate_error_handling_code(&self) -> Result<ErrorConversionCode, Error>
pub fn generate_error_handling_code(&self) -> Result<ErrorConversionCode, Error>
Generate error handling code for Lambda functions
Sourcepub fn generate_handler_wrapper(&self, handler_name: &str) -> String
pub fn generate_handler_wrapper(&self, handler_name: &str) -> String
Generate error handling wrapper for handler functions
Sourcepub fn generate_retry_logic(&self) -> String
pub fn generate_retry_logic(&self) -> String
Generate retry logic for Lambda functions
Sourcepub fn add_error_mapping(
&mut self,
pattern: PythonErrorPattern,
mapping: LambdaErrorMapping,
)
pub fn add_error_mapping( &mut self, pattern: PythonErrorPattern, mapping: LambdaErrorMapping, )
Add custom error mapping
Sourcepub fn get_error_mapping(
&self,
pattern: &PythonErrorPattern,
) -> Option<&LambdaErrorMapping>
pub fn get_error_mapping( &self, pattern: &PythonErrorPattern, ) -> Option<&LambdaErrorMapping>
Get error mapping for a Python error pattern
Trait Implementations§
Source§impl Clone for LambdaErrorHandler
impl Clone for LambdaErrorHandler
Source§fn clone(&self) -> LambdaErrorHandler
fn clone(&self) -> LambdaErrorHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LambdaErrorHandler
impl Debug for LambdaErrorHandler
Source§impl Default for LambdaErrorHandler
impl Default for LambdaErrorHandler
Source§fn default() -> LambdaErrorHandler
fn default() -> LambdaErrorHandler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LambdaErrorHandler
impl RefUnwindSafe for LambdaErrorHandler
impl Send for LambdaErrorHandler
impl Sync for LambdaErrorHandler
impl Unpin for LambdaErrorHandler
impl UnwindSafe for LambdaErrorHandler
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more