pub struct ClientBuilder<'a> {
pub endpoint: Endpoint,
pub user_agent: &'a str,
pub ca: Option<CertificateAuthority<'a>>,
pub authentication: Option<Authentication<'a>>,
}Expand description
Client builder.
Fields§
§endpoint: Endpoint§user_agent: &'a str§ca: Option<CertificateAuthority<'a>>Available on crate feature
§rustls only.authentication: Option<Authentication<'a>>Available on crate features
rustls or jwt only.Implementations§
Source§impl<'a> ClientBuilder<'a>
impl<'a> ClientBuilder<'a>
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ClientBuilder.
Sourcepub fn build_with_middleware<F>(self, f: F) -> Result<Client>
pub fn build_with_middleware<F>(self, f: F) -> Result<Client>
Builds a Client with middleware.
use reqwest_tracing::{SpanBackendWithUrl, TracingMiddleware};
let _client = apple_apns::ClientBuilder::new().build_with_middleware(|builder| {
Ok(builder.with(TracingMiddleware::<SpanBackendWithUrl>::new()))
}).unwrap();Trait Implementations§
Source§impl<'a> Clone for ClientBuilder<'a>
impl<'a> Clone for ClientBuilder<'a>
Source§fn clone(&self) -> ClientBuilder<'a>
fn clone(&self) -> ClientBuilder<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ClientBuilder<'a>
impl<'a> Debug for ClientBuilder<'a>
Auto Trait Implementations§
impl<'a> Freeze for ClientBuilder<'a>
impl<'a> RefUnwindSafe for ClientBuilder<'a>
impl<'a> Send for ClientBuilder<'a>
impl<'a> Sync for ClientBuilder<'a>
impl<'a> Unpin for ClientBuilder<'a>
impl<'a> UnwindSafe for ClientBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more