pub struct ExtractFieldInfo<P: ExtractPlugin> {
pub name: &'static str,
pub field_type: ExtractFieldTypeId,
pub is_list: bool,
pub arg: ExtractArgType,
pub display_name: Option<&'static str>,
pub description: &'static str,
pub add_output: bool,
pub func: ExtractLambda<P>,
}
Expand description
Fields§
§name: &'static str
the name of the extracted field, generally of the form <plugin>.<field>
field_type: ExtractFieldTypeId
the type of the extracted field
is_list: bool
if true, the extract function returns a Vec
of values, not a single one
arg: ExtractArgType
the type of argument the extract function takes
display_name: Option<&'static str>
the display name for the extracted field, defaulting to the name
description: &'static str
a description for the extracted field, mandatory but defaults to the name
add_output: bool
suggest that this field be included in output for compatible event sources
func: ExtractLambda<P>
the function implementing the actual extraction
Implementations§
Source§impl<P: ExtractPlugin> ExtractFieldInfo<P>
impl<P: ExtractPlugin> ExtractFieldInfo<P>
Sourcepub const fn with_display(self, display_name: &'static str) -> Self
pub const fn with_display(self, display_name: &'static str) -> Self
Set the display name fdr the extracted field
Sourcepub const fn with_description(self, description: &'static str) -> Self
pub const fn with_description(self, description: &'static str) -> Self
Set the description for the extracted field
Sourcepub const fn add_output(self) -> Self
pub const fn add_output(self) -> Self
Suggest this field to be appended to the output string for compatible event sources
Trait Implementations§
Source§impl<P: ExtractPlugin> Debug for ExtractFieldInfo<P>
impl<P: ExtractPlugin> Debug for ExtractFieldInfo<P>
Source§impl<P: ExtractPlugin> Serialize for ExtractFieldInfo<P>
impl<P: ExtractPlugin> Serialize for ExtractFieldInfo<P>
Auto Trait Implementations§
impl<P> Freeze for ExtractFieldInfo<P>
impl<P> RefUnwindSafe for ExtractFieldInfo<P>
impl<P> !Send for ExtractFieldInfo<P>
impl<P> !Sync for ExtractFieldInfo<P>
impl<P> Unpin for ExtractFieldInfo<P>
impl<P> UnwindSafe for ExtractFieldInfo<P>
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