[][src]Struct push::communications::ConnectHttp

pub struct ConnectHttp {
    pub options: PushConfiguration,
    pub uaid: Option<String>,
    pub auth: Option<String>,
}

Connect to the Autopush server via the HTTP interface

Fields

options: PushConfigurationuaid: Option<String>auth: Option<String>

Implementations

impl ConnectHttp[src]

fn headers(&self) -> Result<Headers>[src]

Trait Implementations

impl Connection for ConnectHttp[src]

fn subscribe(
    &mut self,
    channel_id: &str,
    app_server_key: Option<&str>
) -> Result<RegisterResponse>
[src]

send a new subscription request to the server, get back the server registration response.

fn unsubscribe(&self, channel_id: Option<&str>) -> Result<bool>[src]

Drop a channel and stop receiving updates.

fn update(&mut self, new_token: &str) -> Result<bool>[src]

Update the push server with the new OS push authorization token

fn channel_list(&self) -> Result<Vec<String>>[src]

Get a list of server known channels. If it differs from what we have, reset the UAID, and refresh channels. Should be done once a day.

fn verify_connection(&self, channels: &[String]) -> Result<bool>[src]

Verify that the server and client both have matching channel information. A "false" should force the client to drop the old UAID, request a new UAID from the server, and resubscribe all channels, resulting in new endpoints.

Auto Trait Implementations

impl RefUnwindSafe for ConnectHttp

impl Send for ConnectHttp

impl Sync for ConnectHttp

impl Unpin for ConnectHttp

impl UnwindSafe for ConnectHttp

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.