pub struct ContextLoader { /* private fields */ }Implementations§
Source§impl ContextLoader
impl ContextLoader
Sourcepub fn with_static_loader(self) -> Self
pub fn with_static_loader(self) -> Self
Using the builder pattern, the StaticLoader can be enabled so that contexts are checked against it before being checked against context_map.
Sourcepub fn with_context_map_from(
self,
preparsed_context_map: HashMap<String, String>,
) -> Result<Self, FromContextMapError>
pub fn with_context_map_from( self, preparsed_context_map: HashMap<String, String>, ) -> Result<Self, FromContextMapError>
Using the builder pattern, the map of additional contexts can be set. These context objects will be checked after StaticLoader (if it’s specified). preparsed_context_map should map the context URLs to their JSON content.
Trait Implementations§
Source§impl Clone for ContextLoader
impl Clone for ContextLoader
Source§fn clone(&self) -> ContextLoader
fn clone(&self) -> ContextLoader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextLoader
impl Debug for ContextLoader
Source§impl Default for ContextLoader
The default ContextLoader only uses StaticLoader.
impl Default for ContextLoader
The default ContextLoader only uses StaticLoader.
Source§impl Loader for ContextLoader
impl Loader for ContextLoader
Source§async fn load(&self, url: &Iri) -> LoadingResult
async fn load(&self, url: &Iri) -> LoadingResult
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 ContextLoader
impl RefUnwindSafe for ContextLoader
impl Send for ContextLoader
impl Sync for ContextLoader
impl Unpin for ContextLoader
impl UnwindSafe for ContextLoader
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