pub struct CachedRequestBuilder<'a, T: CacheManager> { /* private fields */ }
Expand description
A cached HTTP request builder that integrates ureq requests with HTTP caching
Implementations§
Source§impl<'a, T: CacheManager> CachedRequestBuilder<'a, T>
impl<'a, T: CacheManager> CachedRequestBuilder<'a, T>
Sourcepub async fn send_json(
self,
data: Value,
) -> Result<CachedResponse, HttpCacheError>
Available on crate feature json
only.
pub async fn send_json( self, data: Value, ) -> Result<CachedResponse, HttpCacheError>
json
only.Send JSON data with the request
Sourcepub async fn send_string(
self,
data: &str,
) -> Result<CachedResponse, HttpCacheError>
pub async fn send_string( self, data: &str, ) -> Result<CachedResponse, HttpCacheError>
Send string data with the request
Sourcepub async fn call(self) -> Result<CachedResponse, HttpCacheError>
pub async fn call(self) -> Result<CachedResponse, HttpCacheError>
Execute the request with caching
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for CachedRequestBuilder<'a, T>
impl<'a, T> !RefUnwindSafe for CachedRequestBuilder<'a, T>
impl<'a, T> Send for CachedRequestBuilder<'a, T>
impl<'a, T> Sync for CachedRequestBuilder<'a, T>
impl<'a, T> Unpin for CachedRequestBuilder<'a, T>
impl<'a, T> !UnwindSafe for CachedRequestBuilder<'a, T>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more