pub struct PusherBuilder<C> {
    pub app_id: String,
    pub key: String,
    pub secret: String,
    pub host: String,
    pub secure: bool,
    pub http_client: Client<C>,
}
Expand description

An ephemeral object upon which to pass configuration options to when initializing a Pusher instance.

Fields

app_id: Stringkey: Stringsecret: Stringhost: Stringsecure: boolhttp_client: Client<C>

Implementations

Initializes the client that makes requests to the HTTP API, authenticates private- or presence-channels, and validates webhooks.

This returns a PusherBuilder, on which to set configuration options before calling finalize().

Example:

let pusher = PusherBuilder::new("id", "key", "secret").host("foo.bar.com").finalize();

Initializes a client from a Pusher URL.

This returns a PusherBuilder, on which to set configuration options before calling finalize().

Example:

PusherBuilder::from_url("http://key:secret@api.host.com/apps/id").finalize();

Initializes a client from an environment variable Pusher URL.

This returns a PusherBuilder, on which to set configuration options before calling finalize().

Example:

Pusher::from_env("PUSHER_URL").finalize();

Initializes the client with a specified hyper::client::connect::Connect. See pusher::PusherBuilder::new for more detail.

Initializes the client with a specified hyper::client::connect::Connect. See pusher::PusherBuilder::from_url for more detail.

Initializes the client with a specified hyper::client::connect::Connect. See pusher::PusherBuilder::from_env for more detail.

This method changes the host to which API requests will be made. This defaults to api.pusherapp.com.

let pusher = PusherBuilder::new("id", "key", "secret").host("foo.bar.com").finalize();

This method determines whether requests will be made over HTTPS. This defaults to false.

let pusher = PusherBuilder::new("id", "key", "secret").secure().finalize();

If you wish to configure a Hyper client, pass it in to this method.

This method actually creates the Pusher instance from your chained configuration.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more