pub struct ParsedLine {
pub line_number: usize,
pub record_type: String,
pub fields: Vec<String>,
}Expand description
A parsed line from a DAT file.
Fields§
§line_number: usizeThe line number (1-indexed).
record_type: StringThe record type code.
fields: Vec<String>The raw fields (pipe-separated).
Implementations§
Source§impl ParsedLine
impl ParsedLine
Sourcepub fn field(&self, index: usize) -> &str
pub fn field(&self, index: usize) -> &str
Get a field as a string slice, or empty string if out of bounds.
Sourcepub fn field_refs(&self) -> Vec<&str>
pub fn field_refs(&self) -> Vec<&str>
Get field references suitable for from_fields methods.
Sourcepub fn append_continuation(&mut self, line: &str)
pub fn append_continuation(&mut self, line: &str)
Append a continuation line to this record. The continuation text is appended to the last non-empty field.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParsedLine
impl RefUnwindSafe for ParsedLine
impl Send for ParsedLine
impl Sync for ParsedLine
impl Unpin for ParsedLine
impl UnsafeUnpin for ParsedLine
impl UnwindSafe for ParsedLine
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