Struct aws_lambda_log_proxy::ProcessorBuilder
source · pub struct ProcessorBuilder {
pub transformer: Box<dyn FnMut(String) -> Option<String> + Send>,
}
Fields§
§transformer: Box<dyn FnMut(String) -> Option<String> + Send>
See Self::transformer
.
Implementations§
source§impl ProcessorBuilder
impl ProcessorBuilder
sourcepub fn transformer(
self,
t: impl FnMut(String) -> Option<String> + Send + 'static
) -> Self
pub fn transformer( self, t: impl FnMut(String) -> Option<String> + Send + 'static ) -> Self
Set the log line transformer.
If the transformer returns None
, the line will be ignored.
The default transformer will return the input line as is.
sourcepub fn ignore(self, filter: impl FnMut(&str) -> bool + Send + 'static) -> Self
pub fn ignore(self, filter: impl FnMut(&str) -> bool + Send + 'static) -> Self
Set the transformer to a filter function.
If the filter function returns true
, the line will be dropped,
otherwise it will be kept.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProcessorBuilder
impl !RefUnwindSafe for ProcessorBuilder
impl Send for ProcessorBuilder
impl !Sync for ProcessorBuilder
impl Unpin for ProcessorBuilder
impl !UnwindSafe for ProcessorBuilder
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