pub trait CheckedSender: Send {
type PublicKey: PublicKey;
// Required methods
fn recipients(&self) -> Vec<Self::PublicKey>;
fn send(
self,
message: impl Into<IoBufs> + Send,
priority: bool,
) -> Unreliable<Feedback>;
}Expand description
Interface for sending messages to Recipients that are not currently rate-limited.
Required Associated Types§
Sourcetype PublicKey: PublicKey
type PublicKey: PublicKey
Public key type used to identify Recipients.
Required Methods§
Sourcefn recipients(&self) -> Vec<Self::PublicKey>
fn recipients(&self) -> Vec<Self::PublicKey>
Returns the recipients retained by the check.
Sourcefn send(
self,
message: impl Into<IoBufs> + Send,
priority: bool,
) -> Unreliable<Feedback>
fn send( self, message: impl Into<IoBufs> + Send, priority: bool, ) -> Unreliable<Feedback>
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
Feedback from submitting the message for delivery.
Unreliable indicates that local submission may be rejected under backpressure.
Feedback::accepted 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".