pub struct K2KEndpoint {
kernel_id: KernelId,
receiver: Receiver<K2KMessage>,
broker: Arc<K2KBroker>,
}Expand description
K2K endpoint for a single kernel.
Fields§
§kernel_id: KernelIdKernel ID.
receiver: Receiver<K2KMessage>Incoming message channel.
broker: Arc<K2KBroker>Reference to the broker.
Implementations§
Source§impl K2KEndpoint
impl K2KEndpoint
Sourcepub async fn receive(&mut self) -> Option<K2KMessage>
pub async fn receive(&mut self) -> Option<K2KMessage>
Receive a K2K message (blocking).
Sourcepub fn try_receive(&mut self) -> Option<K2KMessage>
pub fn try_receive(&mut self) -> Option<K2KMessage>
Try to receive a K2K message (non-blocking).
Sourcepub async fn send(
&self,
destination: KernelId,
envelope: MessageEnvelope,
) -> Result<DeliveryReceipt>
pub async fn send( &self, destination: KernelId, envelope: MessageEnvelope, ) -> Result<DeliveryReceipt>
Send a message to another kernel.
Sourcepub async fn send_priority(
&self,
destination: KernelId,
envelope: MessageEnvelope,
priority: u8,
) -> Result<DeliveryReceipt>
pub async fn send_priority( &self, destination: KernelId, envelope: MessageEnvelope, priority: u8, ) -> Result<DeliveryReceipt>
Send a high-priority message.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Get pending message count.
Auto Trait Implementations§
impl Freeze for K2KEndpoint
impl !RefUnwindSafe for K2KEndpoint
impl Send for K2KEndpoint
impl Sync for K2KEndpoint
impl Unpin for K2KEndpoint
impl !UnwindSafe for K2KEndpoint
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.