pub struct ReqwestLoader { /* private fields */ }
Expand description
reqwest
-based loader.
Only works with the tokio
runtime.
The loader will follow indirections and Link
headers.
Loaded documents are not cached: a new network query is made each time an URL is loaded even if it has already been queried before.
Implementations§
Source§impl ReqwestLoader
impl ReqwestLoader
Sourcepub fn new() -> ReqwestLoader
pub fn new() -> ReqwestLoader
Creates a new loader with the given parsing function.
Sourcepub fn new_using(options: Options) -> ReqwestLoader
pub fn new_using(options: Options) -> ReqwestLoader
Creates a new leader with the given options.
Trait Implementations§
Source§impl Default for ReqwestLoader
impl Default for ReqwestLoader
Source§fn default() -> ReqwestLoader
fn default() -> ReqwestLoader
Returns the “default value” for a type. Read more
Source§impl Loader for ReqwestLoader
impl Loader for ReqwestLoader
Source§async fn load(&self, url: &Iri) -> Result<RemoteDocument, LoadError>
async fn load(&self, url: &Iri) -> Result<RemoteDocument, LoadError>
Loads the document behind the given IRI.
Source§async fn load_with<V>(
&self,
vocabulary: &mut V,
url: <V as IriVocabulary>::Iri,
) -> Result<RemoteDocument<<V as IriVocabulary>::Iri>, LoadError>
async fn load_with<V>( &self, vocabulary: &mut V, url: <V as IriVocabulary>::Iri, ) -> Result<RemoteDocument<<V as IriVocabulary>::Iri>, LoadError>
Loads the document behind the given IRI, using the given vocabulary.
Auto Trait Implementations§
impl Freeze for ReqwestLoader
impl !RefUnwindSafe for ReqwestLoader
impl Send for ReqwestLoader
impl Sync for ReqwestLoader
impl Unpin for ReqwestLoader
impl !UnwindSafe for ReqwestLoader
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