Skip to main content

AsyncPushSender

Trait AsyncPushSender 

Source
pub trait AsyncPushSender:
    Send
    + Sync
    + 'static {
    // Required method
    fn send(&self, info: PushInfo) -> Result<(), SendError>;
}
Expand description

A trait for sender parts of a channel that can be used for sending push messages from async connection.

Required Methods§

Source

fn send(&self, info: PushInfo) -> Result<(), SendError>

The sender must send without blocking, otherwise it will block the sending connection.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AsyncPushSender for Sender<PushInfo>

Source§

fn send(&self, info: PushInfo) -> Result<(), SendError>

Source§

impl AsyncPushSender for Sender<PushInfo>

Source§

fn send(&self, info: PushInfo) -> Result<(), SendError>

Source§

impl AsyncPushSender for UnboundedSender<PushInfo>

Source§

fn send(&self, info: PushInfo) -> Result<(), SendError>

Source§

impl<T> AsyncPushSender for Arc<T>
where T: AsyncPushSender + ?Sized,

Source§

fn send(&self, info: PushInfo) -> Result<(), SendError>

Implementors§

Source§

impl<T, Func: Fn(PushInfo) -> Result<(), T> + Send + Sync + 'static> AsyncPushSender for Func