Module near_async::messaging

source ·

Structs

  • Sometimes we want to be able to pass in a sender that has not yet been fully constructed. LateBoundSender can act as a placeholder to pass CanSend and CanSendAsync capabilities through to the inner object. bind() should be called when the inner object is ready. All calls to send() and send_async() through this wrapper will block until bind() is called.
  • Wraps a CanSend. This should be used to pass around an Arc<dyn CanSend>, instead of spelling out that type. Using a wrapper struct allows us to define more flexible APIs.

Traits

  • Trait for sending a typed message.
  • Allows the sending of a message while expecting a response.
  • Extension functions to wrap a CanSendAsync as an AsyncSender.
  • Extension functions to wrap a CanSend as a Sender.