pub struct LlmpReceiver<SP> where
    SP: ShMemProvider
{ pub id: u32, pub last_msg_recvd: *const LlmpMsg, pub shmem_provider: SP, pub current_recv_shmem: LlmpSharedMap<SP::ShMem>, /* private fields */ }
Expand description

Receiving end on a (unidirectional) sharedmap channel

Fields

id: u32

Id of this provider

last_msg_recvd: *const LlmpMsg

Pointer to the last message received

shmem_provider: SP

The shmem provider

current_recv_shmem: LlmpSharedMap<SP::ShMem>

current page. After EOP, this gets replaced with the new one

Implementations

Receiving end of an llmp channel

Reattach to a vacant recv_shmem, to with a previous sender stored the information in an env before.

Store the info to this receiver to env. A new client can reattach to it using LlmpReceiver::on_existing_from_env()

Create a Receiver, reattaching to an existing sender map. It is essential, that the sender (or someone else) keeps a pointer to the sender_shmem else reattach will get a new, empty page, from the OS, or fail.

Blocks/spins until the next message gets posted to the page, then returns that message.

Safety

Returns a raw ptr, on the recv map. Should be safe in general

Returns the next message, tag, buf, if available, else None

Receive the buffer, also reading the LLMP internal message flags

Returns the next sender, tag, buf, looping until it becomes available

Describe this client in a way, that it can be restored later with Self::on_existing_from_description

Create this client on an existing map from the given description. acquired with self.describe

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The Resulting TupleList, of an Prepend::prepend() call, including the prepended entry. Read more

Prepend a value to this tuple, returning a new tuple with prepended value.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.