pub struct AsyncHttpRetriever { /* private fields */ }Expand description
Async HTTP-based schema retriever with configurable client options.
This retriever fetches external schemas over HTTP/HTTPS using a
configured async reqwest client.
Implementations§
Source§impl AsyncHttpRetriever
impl AsyncHttpRetriever
Sourcepub fn new(options: &HttpOptions) -> Result<Self, HttpRetrieverError>
pub fn new(options: &HttpOptions) -> Result<Self, HttpRetrieverError>
Create a new async HTTP retriever with the given options.
§Errors
Returns an error if:
- The certificate file cannot be read
- The certificate is not valid PEM
- The HTTP client cannot be built
Trait Implementations§
Source§impl AsyncRetrieve for AsyncHttpRetriever
impl AsyncRetrieve for AsyncHttpRetriever
Source§fn retrieve<'life0, 'life1, 'async_trait>(
&'life0 self,
uri: &'life1 Uri<String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn retrieve<'life0, 'life1, 'async_trait>(
&'life0 self,
uri: &'life1 Uri<String>,
) -> Pin<Box<dyn Future<Output = Result<Value, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Asynchronously retrieve a resource from the given URI. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for AsyncHttpRetriever
impl !UnwindSafe for AsyncHttpRetriever
impl Freeze for AsyncHttpRetriever
impl Send for AsyncHttpRetriever
impl Sync for AsyncHttpRetriever
impl Unpin for AsyncHttpRetriever
impl UnsafeUnpin for AsyncHttpRetriever
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