pub struct ParserConfig {
pub fields: HashMap<String, u8>,
pub delimiter: Vec<u8>,
}Expand description
Parser configuration with field mappings.
Define your record schema by mapping field names to positional indices and specifying the delimiter used to split records into fields.
§Example
use bytecode_filter::ParserConfig;
let mut config = ParserConfig::default();
config.set_delimiter(",");
config.add_field("STATUS", 0);
config.add_field("CODE", 1);
config.add_field("BODY", 2);Fields§
§fields: HashMap<String, u8>Map of field names to part indices.
delimiter: Vec<u8>The delimiter used to split records into fields.
Implementations§
Trait Implementations§
Source§impl Clone for ParserConfig
impl Clone for ParserConfig
Source§fn clone(&self) -> ParserConfig
fn clone(&self) -> ParserConfig
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 ParserConfig
impl Debug for ParserConfig
Auto Trait Implementations§
impl Freeze for ParserConfig
impl RefUnwindSafe for ParserConfig
impl Send for ParserConfig
impl Sync for ParserConfig
impl Unpin for ParserConfig
impl UnsafeUnpin for ParserConfig
impl UnwindSafe for ParserConfig
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