pub struct K2KEndpoint { /* private fields */ }Expand description
K2K endpoint for a single kernel.
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§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§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
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§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.