Struct pusher::PusherBuilder
[−]
[src]
pub struct PusherBuilder { pub app_id: String, pub key: String, pub secret: String, pub host: String, pub secure: bool, pub http_client: Client, }
An ephemeral object upon which to pass configuration options to when initializing a Pusher instance.
Fields
app_id: String
key: String
secret: String
host: String
secure: bool
http_client: Client
Methods
impl PusherBuilder
[src]
fn host(self, host: &str) -> PusherBuilder
This method changes the host to which API requests will be made.
This defaults to api.pusherapp.com
.
let mut pusher = Pusher::new("id", "key", "secret").host("foo.bar.com").finalize();
fn secure(self) -> PusherBuilder
This method determines whether requests will be made over HTTPS. This defaults to false
.
let mut pusher = Pusher::new("id", "key", "secret").secure().finalize();
fn client(self, http_client: Client) -> PusherBuilder
If you wish to configure a Hyper client, pass it in to this method.
fn finalize(self) -> Pusher
This method actually creates the Pusher
instance from your chained configuration.