pub struct PendingRequest { /* private fields */ }Expand description
Fluent outbound request.
Implementations§
Source§impl PendingRequest
impl PendingRequest
pub fn header(self, name: impl AsRef<str>, value: impl AsRef<str>) -> Self
pub fn bearer_auth(self, token: impl AsRef<str>) -> Self
pub fn json<T: Serialize>(self, body: &T) -> Self
pub fn body(self, bytes: impl Into<Bytes>) -> Self
pub fn timeout(self, dur: Duration) -> Self
Sourcepub fn with_budget(self, remaining: Option<Duration>) -> Self
pub fn with_budget(self, remaining: Option<Duration>) -> Self
Cap by remaining inbound request budget.
pub fn retry(self, times: u32) -> Self
pub fn idempotency_key(self, key: impl Into<String>) -> Self
pub fn send(self) -> BoxFuture<Result<OutResponse, HttpError>>
Auto Trait Implementations§
impl !Freeze for PendingRequest
impl !RefUnwindSafe for PendingRequest
impl !UnwindSafe for PendingRequest
impl Send for PendingRequest
impl Sync for PendingRequest
impl Unpin for PendingRequest
impl UnsafeUnpin for PendingRequest
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