[−][src]Struct pusher::PusherBuilder
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<C>
Implementations
impl PusherBuilder<HttpConnector>
[src]
pub fn new(
app_id: &str,
key: &str,
secret: &str
) -> PusherBuilder<HttpConnector>
[src]
app_id: &str,
key: &str,
secret: &str
) -> PusherBuilder<HttpConnector>
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();
pub fn from_url(url: &str) -> PusherBuilder<HttpConnector>
[src]
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();
pub fn from_env(key: &str) -> PusherBuilder<HttpConnector>
[src]
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();
impl<C> PusherBuilder<C>
[src]
pub fn new_with_client(
http_client: Client<C>,
app_id: &str,
key: &str,
secret: &str
) -> PusherBuilder<C>
[src]
http_client: Client<C>,
app_id: &str,
key: &str,
secret: &str
) -> PusherBuilder<C>
Initializes the client with a specified hyper::client::connect::Connect. See pusher::PusherBuilder::new for more detail.
pub fn from_url_with_client(
http_client: Client<C>,
url: &str
) -> PusherBuilder<C>
[src]
http_client: Client<C>,
url: &str
) -> PusherBuilder<C>
Initializes the client with a specified hyper::client::connect::Connect. See pusher::PusherBuilder::from_url for more detail.
pub fn from_env_with_client(
http_client: Client<C>,
key: &str
) -> PusherBuilder<C>
[src]
http_client: Client<C>,
key: &str
) -> PusherBuilder<C>
Initializes the client with a specified hyper::client::connect::Connect. See pusher::PusherBuilder::from_env for more detail.
pub fn host(self, host: &str) -> PusherBuilder<C>
[src]
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();
pub fn secure(self) -> PusherBuilder<C>
[src]
This method determines whether requests will be made over HTTPS. This defaults to false
.
let pusher = PusherBuilder::new("id", "key", "secret").secure().finalize();
pub fn client(self, http_client: Client<C>) -> PusherBuilder<C>
[src]
If you wish to configure a Hyper client, pass it in to this method.
pub fn finalize(self) -> Pusher<C>
[src]
This method actually creates the Pusher
instance from your chained configuration.
Auto Trait Implementations
impl<C> !RefUnwindSafe for PusherBuilder<C>
impl<C> Send for PusherBuilder<C> where
C: Send,
C: Send,
impl<C> Sync for PusherBuilder<C> where
C: Sync,
C: Sync,
impl<C> Unpin for PusherBuilder<C> where
C: Unpin,
C: Unpin,
impl<C> !UnwindSafe for PusherBuilder<C>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,