#[non_exhaustive]pub struct InlineUUBlock {
pub begin_offset: u32,
pub begin_length: Option<u32>,
pub mode: u32,
pub filename: String,
pub data: Vec<u8>,
pub is_encoding_problem: bool,
}Expand description
A single UU-encoded binary block found inside a part body.
All byte offsets are absolute — they are in the same coordinate space
as ParsedPart::body_range and the raw buffer passed to
scan_inline_uuencode().
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.begin_offset: u32Byte offset of the begin NNN filename line within raw.
Slicing raw[begin_offset .. begin_offset + begin_length] (when
begin_length is Some) yields the complete UU block from the
begin line through the end line (inclusive).
When [is_encoding_problem] is true, begin_length is None.
begin_offset still reflects the actual position of the offending
begin or begin-base64 line within raw, so it can be used for
diagnostic purposes.
begin_length: Option<u32>Byte length of the entire UU block: from the start of the begin line
through the end of the end line (inclusive of its newline).
None when [is_encoding_problem] is true, because the block end
boundary is not determined for error items (begin-base64 and
malformed begin lines).
mode: u32File permission mode parsed from the begin line, e.g. 0o644.
filename: StringFilename parsed verbatim from the begin line.
data: Vec<u8>Decoded binary content. Empty if is_encoding_problem is true and
no bytes could be decoded, or if the encoded payload was genuinely
empty (backtick-only lines).
is_encoding_problem: boolTrue if any decoding error was encountered (unknown/malformed line
length byte, wrong number of encoded characters, missing end line,
or a begin-base64 block was detected).
A partial decode may still be present in data.
Trait Implementations§
Source§impl Clone for InlineUUBlock
impl Clone for InlineUUBlock
Source§fn clone(&self) -> InlineUUBlock
fn clone(&self) -> InlineUUBlock
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InlineUUBlock
impl Debug for InlineUUBlock
Source§impl<'de> Deserialize<'de> for InlineUUBlock
impl<'de> Deserialize<'de> for InlineUUBlock
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for InlineUUBlock
Source§impl Hash for InlineUUBlock
impl Hash for InlineUUBlock
Source§impl PartialEq for InlineUUBlock
impl PartialEq for InlineUUBlock
Source§fn eq(&self, other: &InlineUUBlock) -> bool
fn eq(&self, other: &InlineUUBlock) -> bool
self and other values to be equal, and is used by ==.