pub struct Request<'a, E, R> { /* private fields */ }Implementations§
Source§impl<'a, E: Endpoint, R: FromResponse> Request<'a, E, R>
impl<'a, E: Endpoint, R: FromResponse> Request<'a, E, R>
pub async fn send(self) -> Result<R, ForgejoError>
pub fn response_type<T: FromResponse>(self) -> Request<'a, E, T>
pub fn page(self, page: u32) -> Self
pub fn page_size(self, limit: u32) -> Self
Source§impl<'a, E: Endpoint, H: CountHeader, T: PageSize> Request<'a, E, (H, T)>where
(H, T): FromResponse,
impl<'a, E: Endpoint, H: CountHeader, T: PageSize> Request<'a, E, (H, T)>where
(H, T): FromResponse,
pub fn stream_pages(self) -> PageStream<'a, E, T, H>
Source§impl<'a, E: Endpoint + 'a, T: 'a, H: CountHeader + 'a> Request<'a, E, (H, Vec<T>)>where
(H, Vec<T>): FromResponse,
impl<'a, E: Endpoint + 'a, T: 'a, H: CountHeader + 'a> Request<'a, E, (H, Vec<T>)>where
(H, Vec<T>): FromResponse,
pub fn stream( self, ) -> impl Stream<Item = Result<T, ForgejoError>> + use<'a, E, T, H>
pub async fn all(self) -> Result<Vec<T>, ForgejoError>
Trait Implementations§
Source§impl<'a, E: Endpoint, R: FromResponse> IntoFuture for Request<'a, E, R>
impl<'a, E: Endpoint, R: FromResponse> IntoFuture for Request<'a, E, R>
Source§type Output = Result<R, ForgejoError>
type Output = Result<R, ForgejoError>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <Request<'a, E, R> as IntoFuture>::Output> + Send + Sync + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <Request<'a, E, R> as IntoFuture>::Output> + Send + Sync + 'a>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<'a, E, R> !Freeze for Request<'a, E, R>
impl<'a, E, R> !RefUnwindSafe for Request<'a, E, R>
impl<'a, E, R> !Send for Request<'a, E, R>
impl<'a, E, R> !Sync for Request<'a, E, R>
impl<'a, E, R> Unpin for Request<'a, E, R>
impl<'a, E, R> !UnwindSafe for Request<'a, E, R>
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