pub struct ParsedToc {
pub entries: Vec<TocEntry>,
pub raw_text: String,
}Expand description
Result of parsing a TOC body.
entries may be a strict subset of the lines in the body: lines that do
not look like TOC entries (plain text, comments, blank lines) are silently
skipped. Inspect raw_text for the original body when debugging partial
results.
§Example
use uuencoding_multi::parse_toc;
let body = b"# TOC\nfile.bin (512 bytes)\n";
let toc = parse_toc(body).unwrap();
assert_eq!(toc.entries.len(), 1);
assert!(toc.raw_text.contains("# TOC"));Fields§
§entries: Vec<TocEntry>Successfully parsed entries; may be a strict subset of all lines.
raw_text: StringFull body text kept verbatim for diagnostic use when parsing is partial.
Non-UTF-8 bytes are replaced with the Unicode replacement character
(U+FFFD) via lossy conversion.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParsedToc
impl RefUnwindSafe for ParsedToc
impl Send for ParsedToc
impl Sync for ParsedToc
impl Unpin for ParsedToc
impl UnsafeUnpin for ParsedToc
impl UnwindSafe for ParsedToc
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