Struct web_push::WebPushClient
[−]
[src]
pub struct WebPushClient { /* fields omitted */ }An async client for sending the notification payload.
Methods
impl WebPushClient[src]
pub fn new(handle: &Handle) -> Result<WebPushClient, WebPushError>[src]
pub fn send(&self, message: WebPushMessage) -> WebPushResponse[src]
Sends a notification. Never times out.
pub fn send_with_timeout(
&self,
message: WebPushMessage,
timeout: Duration
) -> Timeout<WebPushResponse>[src]
&self,
message: WebPushMessage,
timeout: Duration
) -> Timeout<WebPushResponse>
Sends a notification with a timeout. Triggers WebPushError::TimeoutError if the request takes too long.
Trait Implementations
impl Service for WebPushClient[src]
type Request = WebPushMessage
Requests handled by the service.
type Response = ()
Responses given by the service.
type Error = WebPushError
Errors produced by the service.
type Future = WebPushResponse
The future response value.
fn call(&self, message: Self::Request) -> Self::Future[src]
Process the request and return the response asynchronously.