pub struct EndpointRequestBuilder<'a, E: Endpoint> { /* private fields */ }Expand description
Fluent builder for a typed Endpoint.
Implementations§
Source§impl<'a, E: Endpoint> EndpointRequestBuilder<'a, E>
impl<'a, E: Endpoint> EndpointRequestBuilder<'a, E>
pub fn params(self, params: E::Params) -> Self
pub fn query(self, query: E::Query) -> Self
pub fn param(self, key: impl Into<String>, value: impl ToString) -> Self
pub fn query_pair(self, key: impl Into<String>, value: impl ToString) -> Self
pub fn header( self, key: impl AsRef<str>, value: impl AsRef<str>, ) -> Result<Self>
pub fn bearer_token(self, token: impl Into<String>) -> Self
pub fn cancellation_token(self, token: CancellationToken) -> Self
pub fn throw_on_error(self, throw: bool) -> Self
pub async fn send(self) -> Result<Response>
pub async fn send_json(self) -> Result<E::Response>
pub fn into_inner(self) -> RequestBuilder<'a>
Auto Trait Implementations§
impl<'a, E> !Freeze for EndpointRequestBuilder<'a, E>
impl<'a, E> !RefUnwindSafe for EndpointRequestBuilder<'a, E>
impl<'a, E> Send for EndpointRequestBuilder<'a, E>where
E: Send,
impl<'a, E> Sync for EndpointRequestBuilder<'a, E>where
E: Sync,
impl<'a, E> Unpin for EndpointRequestBuilder<'a, E>where
E: Unpin,
impl<'a, E> UnsafeUnpin for EndpointRequestBuilder<'a, E>
impl<'a, E> !UnwindSafe for EndpointRequestBuilder<'a, E>
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