Skip to main content

Message

Enum Message 

Source
pub enum Message<'a> {
    Delivered(Delivery<'a>),
    Request {
        destination: DestinationHash,
        link_id: LinkId,
        request_id: RequestId,
        requester: Option<IdentityHash>,
        path_hash: RequestPathHash,
        requested_at: InstantMillis,
        rtt: RttMillis,
        data: &'a [u8],
    },
    Response {
        link_id: LinkId,
        request_id: RequestId,
        data: &'a [u8],
    },
    ResponseSegment {
        link_id: LinkId,
        request_id: RequestId,
        segment_index: u64,
        total_segments: u64,
        data: &'a [u8],
    },
    Resource {
        link_id: LinkId,
        hash: ResourceHash,
        metadata: Option<&'a [u8]>,
        data: &'a [u8],
    },
    ResourceNeedsDecompression {
        link_id: LinkId,
        hash: ResourceHash,
        stream: &'a [u8],
        uncompressed_data_bytes: u64,
    },
    ResourceSegment {
        link_id: LinkId,
        original_hash: ResourceHash,
        segment_index: u64,
        total_segments: u64,
        metadata: Option<&'a [u8]>,
        data: &'a [u8],
    },
    ChannelMessage {
        link_id: LinkId,
        message_type: MessageType,
        data: &'a [u8],
    },
}
Expand description

The data plane: bytes the app owns.

Variants§

§

Delivered(Delivery<'a>)

§

Request

Fields

§destination: DestinationHash
§link_id: LinkId
§request_id: RequestId
§requested_at: InstantMillis
§data: &'a [u8]
§

Response

Fields

§link_id: LinkId
§request_id: RequestId
§data: &'a [u8]
§

ResponseSegment

One in-order segment of a split response; the request’s settlement arrives as a Diagnostic::CommandSettled when the final segment assembles.

Fields

§link_id: LinkId
§request_id: RequestId
§segment_index: u64
§total_segments: u64
§data: &'a [u8]
§

Resource

Fields

§link_id: LinkId
§metadata: Option<&'a [u8]>

The transfer’s packed metadata, stripped from the stream head, opaque to the engine; None when none traveled.

§data: &'a [u8]
§

ResourceNeedsDecompression

Fields

§link_id: LinkId
§stream: &'a [u8]
§uncompressed_data_bytes: u64
§

ResourceSegment

Fields

§link_id: LinkId
§original_hash: ResourceHash
§segment_index: u64
§total_segments: u64
§metadata: Option<&'a [u8]>

Rides segment one only, stripped from the stream head like the single-segment delivery.

§data: &'a [u8]
§

ChannelMessage

Fields

§link_id: LinkId
§message_type: MessageType
§data: &'a [u8]

Trait Implementations§

Source§

impl<'a> Debug for Message<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Message<'a>

§

impl<'a> RefUnwindSafe for Message<'a>

§

impl<'a> Send for Message<'a>

§

impl<'a> Sync for Message<'a>

§

impl<'a> Unpin for Message<'a>

§

impl<'a> UnsafeUnpin for Message<'a>

§

impl<'a> UnwindSafe for Message<'a>

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> Same for T

Source§

type Output = T

Should always be Self
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.