Skip to main content

MessagePart

Struct MessagePart 

Source
pub struct MessagePart {
    pub chunks: Chunks,
    pub unordered: bool,
    pub first: bool,
    pub end_of_record: bool,
}
Expand description

Part of a message, read with Stream::read_part: the partial delivery API of RFC 9260 section 6.9 (the RECEIVE primitive’s “partial flag”, section 11.1.7; MSG_EOR of RFC 6458 section 3.1.4).

A message that is complete when it is read is one part with end_of_record set. One the receive buffer cannot hold whole is read in several, in order: the first with first set, the last with end_of_record set, all of them from the same stream with no part of another message of that stream between them (RFC 6458 section 3.1.4: “Only one message at a time can be partially delivered in any stream”). If the sender abandons the message before its last part (RFC 3758, RFC 8260 section 2.3.1), no part with end_of_record follows: StreamEvent::PartialDeliveryAborted says so instead.

Fields§

§chunks: Chunks

The bytes of this part, as the fragments that carried them. Its ssn, mid, ppi and ppid are the message’s.

§unordered: bool

The message was sent unordered.

§first: bool

This part starts the message.

§end_of_record: bool

This part ends the message (“no more deliveries will be received for this stream sequence number”, RFC 9260 section 11.1.7; RFC 6458 MSG_EOR).

Trait Implementations§

Source§

impl Debug for MessagePart

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.