CheckedSender

Trait CheckedSender 

Source
pub trait CheckedSender: Send {
    type PublicKey: PublicKey;
    type Error: Debug + StdError + Send + Sync;

    // Required method
    fn send(
        self,
        message: Bytes,
        priority: bool,
    ) -> impl Future<Output = Result<Vec<Self::PublicKey>, Self::Error>> + Send;
}
Expand description

Interface for sending messages to Recipients that are not currently rate-limited.

Required Associated Types§

Source

type PublicKey: PublicKey

Public key type used to identify Recipients.

Source

type Error: Debug + StdError + Send + Sync

Error that can occur when sending a message.

Required Methods§

Source

fn send( self, message: Bytes, priority: bool, ) -> impl Future<Output = Result<Vec<Self::PublicKey>, Self::Error>> + Send

Sends a message to the pre-checked recipients.

§Offline Recipients

If a recipient is offline at the time a message is sent, the message will be dropped. It is up to the application to handle retries (if necessary).

§Returns

A vector of recipients that the message was sent to, or an error if the message could not be sent (e.g., too large).

Note: a successful send does not guarantee that the recipient will receive the message.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§