Pusher

Trait Pusher 

Source
pub trait Pusher<'b, M, R>
where M: Sync, R: Send,
{ const TOKEN_LIMIT: usize = 500usize; // Required method fn push<'life0, 'async_trait>( &'life0 self, msg: &'b M, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'b: 'async_trait, 'life0: 'async_trait; // Provided methods fn retry_push<'life0, 'async_trait>( &'life0 self, msg: &'b M, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'b: 'async_trait, 'life0: 'async_trait { ... } fn retry_batch_push<'life0, 'async_trait>( &'life0 self, msgs: &'b [M], ) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'b: 'async_trait, 'life0: 'async_trait { ... } }

Provided Associated Constants§

Source

const TOKEN_LIMIT: usize = 500usize

Required Methods§

Source

fn push<'life0, 'async_trait>( &'life0 self, msg: &'b M, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'b: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn retry_push<'life0, 'async_trait>( &'life0 self, msg: &'b M, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'b: 'async_trait, 'life0: 'async_trait,

Source

fn retry_batch_push<'life0, 'async_trait>( &'life0 self, msgs: &'b [M], ) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'b: 'async_trait, 'life0: 'async_trait,

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§

Source§

impl<'a> Pusher<'a, Notification<'a>, Response> for hi_push::apns::Client

Source§

impl<'b> Pusher<'b, Message<'b>, Response<'b>> for hi_push::email::Client

Source§

impl<'b> Pusher<'b, MulticastMessage<'b>, BatchResponse> for hi_push::fcm::Client

Source§

const TOKEN_LIMIT: usize = 1_000usize

Source§

impl<'b> Pusher<'b, Message<'b>, Response> for hi_push::huawei::Client

Source§

impl<'b> Pusher<'b, Msg<'b>, ()> for hi_push::rtm::Client

Source§

impl<'b> Pusher<'b, Message<'b>, Response> for hi_push::wecom::Client

Source§

impl<'b> Pusher<'b, Message<'b>, Response> for hi_push::xiaomi::Client

Source§

const TOKEN_LIMIT: usize = 1_000usize