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