Struct K2KEndpoint
pub struct K2KEndpoint {
kernel_id: KernelId,
receiver: Receiver<K2KMessage>,
broker: Arc<K2KBroker>,
}Expand description
K2K endpoint for a single kernel.
Fields§
§kernel_id: KernelId§receiver: Receiver<K2KMessage>§broker: Arc<K2KBroker>Implementations§
§impl K2KEndpoint
impl K2KEndpoint
pub async fn receive(&mut self) -> Option<K2KMessage>
pub async fn receive(&mut self) -> Option<K2KMessage>
Receive a K2K message (blocking).
pub fn try_receive(&mut self) -> Option<K2KMessage>
pub fn try_receive(&mut self) -> Option<K2KMessage>
Try to receive a K2K message (non-blocking).
pub async fn send(
&self,
destination: KernelId,
envelope: MessageEnvelope,
) -> Result<DeliveryReceipt, RingKernelError>
pub async fn send( &self, destination: KernelId, envelope: MessageEnvelope, ) -> Result<DeliveryReceipt, RingKernelError>
Send a message to another kernel.
pub async fn send_priority(
&self,
destination: KernelId,
envelope: MessageEnvelope,
priority: u8,
) -> Result<DeliveryReceipt, RingKernelError>
pub async fn send_priority( &self, destination: KernelId, envelope: MessageEnvelope, priority: u8, ) -> Result<DeliveryReceipt, RingKernelError>
Send a high-priority message.
pub 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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§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.