pub struct ReqwestLoader { /* private fields */ }Available on crate feature
reqwest only.Expand description
reqwest-based loader.
Only works with the tokio runtime.
Follows HTTP redirections and JSON-LD Link headers, up to
Options::max_redirections.
Loaded documents are not cached: a new network request is made each time a URL is loaded, even if it has been fetched before.
Implementations§
Source§impl ReqwestLoader
impl ReqwestLoader
Sourcepub fn new() -> ReqwestLoader
pub fn new() -> ReqwestLoader
Creates a new loader with the default options.
Sourcepub fn new_using(options: Options) -> ReqwestLoader
pub fn new_using(options: Options) -> ReqwestLoader
Creates a new loader 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<&str>,
) -> Result<RemoteDocument, LoadError<<ReqwestLoader as Loader>::Error>>
async fn load( &self, url: Iri<&str>, ) -> Result<RemoteDocument, LoadError<<ReqwestLoader as Loader>::Error>>
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<Self::Error>>
async fn load_with<V>( &self, vocabulary: &mut V, url: <V as IriVocabulary>::Iri, ) -> Result<RemoteDocument<<V as IriVocabulary>::Iri>, LoadError<Self::Error>>
Loads the document behind the given IRI, using the given vocabulary. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ReqwestLoader
impl !UnwindSafe for ReqwestLoader
impl Freeze for ReqwestLoader
impl Send for ReqwestLoader
impl Sync for ReqwestLoader
impl Unpin for ReqwestLoader
impl UnsafeUnpin 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
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Views this value as an
Unordered reference.