pub struct ReassembledFile {
pub filename: String,
pub mode: u32,
pub data: Vec<u8>,
pub is_truncated: bool,
pub missing_parts: Vec<u32>,
}Expand description
A successfully reassembled multi-part UU-encoded file.
Returned by reassemble. The data field holds the decoded binary
payload; callers should inspect is_truncated before trusting the result.
§Security note
data may contain a compressed archive. This crate never decompresses
the output. Apply independent size and resource limits before
decompressing to protect against decompression-bomb attacks.
Fields§
§filename: StringFilename extracted from the begin line of the first UU part.
This is whatever filename appeared in the source message; it is not sanitised. Callers that write this to disk should validate it against path-traversal patterns.
mode: u32Unix permission mode (e.g. 0o644) from the begin line of the first
part. Subsequent parts may specify different modes; only the first
part’s value is used.
data: Vec<u8>Decoded binary payload, formed by concatenating the decoded output of
each present part in ascending part_number order.
When is_truncated is true this slice is incomplete: it contains
only the bytes contributed by the parts that were present.
is_truncated: booltrue when one or more parts were absent from the collection, or when
any individual part’s UU body was missing its end line. The data is
likely corrupt in this case.
missing_parts: Vec<u32>Part numbers in 1..=total that were absent from the collection, in
ascending order. Empty when the collection was complete.