Skip to main content

PartEntry

Struct PartEntry 

Source
pub struct PartEntry {
    pub part_number: u32,
    pub body_bytes: Vec<u8>,
    pub subject: Option<String>,
}
Expand description

A single collected part awaiting reassembly.

The caller is responsible for extracting body_bytes from the MIME or plain-text message layer before constructing a PartEntry. This crate treats body_bytes as an opaque UU-encoded byte sequence and passes it directly to the uuencoding decoder.

§Example

use uuencoding_multi::PartEntry;

let entry = PartEntry {
    part_number: 1,
    body_bytes: b"begin 644 file.bin\nend\n".to_vec(),
    subject: Some("myfile.bin (1/3)".to_string()),
};
assert_eq!(entry.part_number, 1);

Fields§

§part_number: u32

1-based part index; 0 = TOC post.

The value 0 is reserved for the optional table-of-contents post that Usenet series sometimes include as the first message. TOC parts do not contribute to the sequential 1..=total count used during reassembly.

§body_bytes: Vec<u8>

Raw bytes of this part’s UU body, already extracted from the MIME layer by the caller. Passed verbatim to uuencoding::decode during reassembly.

§subject: Option<String>

Original Subject header value, kept for diagnostics and logging. Not used during reassembly.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.