Struct glimesh::http::ConnectionBuilder [−][src]
pub struct ConnectionBuilder { /* fields omitted */ }
Configure and build an http Connection
.
Usage:
let connection = Connection::builder() .user_agent("My App / 0.1.0") .build();
Implementations
impl ConnectionBuilder
[src]
pub fn build(self, auth: Auth) -> Connection
[src]
Build the http connection from the set options.
Panics
This function panics if the TLS backend cannot be initialized, or the resolver cannot load the system configuration.
pub fn user_agent(self, value: impl Into<String>) -> Self
[src]
Set the user agent the http client will identify itself as.
This defaults to Glimesh Rust / x.x.x
where x.x.x
is the version of this package.
pub fn timeout(self, value: Duration) -> Self
[src]
Set the timeout for requests made to glimesh.
The default is 30 seconds
pub fn api_url(self, value: impl Into<String>) -> Self
[src]
Set the base api url used for request. Useful if running Glimesh locally for example.
Defaults to https://glimesh.tv/api
Trait Implementations
impl Debug for ConnectionBuilder
[src]
impl Default for ConnectionBuilder
[src]
fn default() -> ConnectionBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConnectionBuilder
impl Send for ConnectionBuilder
impl Sync for ConnectionBuilder
impl Unpin for ConnectionBuilder
impl UnwindSafe for ConnectionBuilder
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,