pub struct PhotonClientBuilder { /* private fields */ }Implementations§
Source§impl PhotonClientBuilder
impl PhotonClientBuilder
pub fn new() -> Self
pub fn base_url(self, base_url: impl Into<String>) -> Self
pub fn static_headers(self, headers: HeaderMap) -> Self
pub fn headers<F, Fut>(self, provider: F) -> Self
Sourcepub fn credential(
self,
scheme: impl Into<String>,
credential: Credential,
) -> Self
pub fn credential( self, scheme: impl Into<String>, credential: Credential, ) -> Self
Register a credential under an OpenAPI security-scheme name.
The scheme name must match a key in components.securitySchemes. The
generated client validates operation security requirements before the
transport backend runs, so credentials must be registered here rather
than supplied only through Self::static_headers or Self::headers.
pub fn timeout(self, timeout: Duration) -> Self
pub fn max_attempts(self, max_attempts: usize) -> Self
Sourcepub fn maximum_retry_after(self, maximum_retry_after: Duration) -> Self
pub fn maximum_retry_after(self, maximum_retry_after: Duration) -> Self
Longest server-requested Retry-After delay to wait for before a retry
(default 60 seconds). A longer delay is not shortened: the client stops
retrying and returns that response.
pub fn reqwest_client(self, client: Client) -> Self
pub fn build(self) -> Result<Client, Error<Infallible>>
Trait Implementations§
Source§impl Clone for PhotonClientBuilder
impl Clone for PhotonClientBuilder
Source§impl Debug for PhotonClientBuilder
impl Debug for PhotonClientBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for PhotonClientBuilder
impl !UnwindSafe for PhotonClientBuilder
impl Freeze for PhotonClientBuilder
impl Send for PhotonClientBuilder
impl Sync for PhotonClientBuilder
impl Unpin for PhotonClientBuilder
impl UnsafeUnpin for PhotonClientBuilder
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