pub struct RemoteShard { /* private fields */ }Expand description
Handle to a specific target shard for message sending.
Implementations§
Source§impl RemoteShard
impl RemoteShard
Sourcepub fn send_raw(&self, tag: u16, val: u32) -> Result<SendTicket, SendError>
pub fn send_raw(&self, tag: u16, val: u32) -> Result<SendTicket, SendError>
Sends one raw (tag, val) message and returns an acknowledgement ticket.
Sourcepub fn send_raw_nowait(&self, tag: u16, val: u32) -> Result<(), SendError>
pub fn send_raw_nowait(&self, tag: u16, val: u32) -> Result<(), SendError>
Sends one raw (tag, val) message without waiting for acknowledgement.
Sourcepub fn send_many_raw_nowait<I>(&self, msgs: I) -> Result<(), SendError>
pub fn send_many_raw_nowait<I>(&self, msgs: I) -> Result<(), SendError>
Sends a batch of raw messages without acknowledgement tickets.
Sourcepub fn send_raw_direct_nowait(
&self,
tag: u16,
val: u32,
) -> Result<(), SendError>
pub fn send_raw_direct_nowait( &self, tag: u16, val: u32, ) -> Result<(), SendError>
Attempts direct in-ring submission for one message when called on-shard.
Falls back to queued path when called outside runtime worker context.
Sourcepub fn send_many_raw_direct_nowait<I>(&self, msgs: I) -> Result<(), SendError>
pub fn send_many_raw_direct_nowait<I>(&self, msgs: I) -> Result<(), SendError>
Attempts direct in-ring submission for a batch when called on-shard.
Falls back to queued path when called outside runtime worker context.
Sourcepub fn send<M: RingMsg>(&self, msg: M) -> Result<SendTicket, SendError>
pub fn send<M: RingMsg>(&self, msg: M) -> Result<SendTicket, SendError>
Sends a typed message and returns an acknowledgement ticket.
Sourcepub fn send_nowait<M: RingMsg>(&self, msg: M) -> Result<(), SendError>
pub fn send_nowait<M: RingMsg>(&self, msg: M) -> Result<(), SendError>
Sends a typed message without waiting for acknowledgement.
Sourcepub fn send_many_nowait<M, I>(&self, msgs: I) -> Result<(), SendError>where
M: RingMsg,
I: IntoIterator<Item = M>,
pub fn send_many_nowait<M, I>(&self, msgs: I) -> Result<(), SendError>where
M: RingMsg,
I: IntoIterator<Item = M>,
Sends a batch of typed messages without acknowledgement.
Sourcepub fn flush(&self) -> Result<SendTicket, SendError>
pub fn flush(&self) -> Result<SendTicket, SendError>
Flushes pending local sends and returns a completion ticket.
Trait Implementations§
Source§impl Clone for RemoteShard
impl Clone for RemoteShard
Source§fn clone(&self) -> RemoteShard
fn clone(&self) -> RemoteShard
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more