Trait Retrieve

Source
pub trait Retrieve: Send + Sync {
    // Required method
    fn retrieve(
        &self,
        uri: &Uri<String>,
    ) -> Result<Value, Box<dyn Error + Sync + Send>>;
}
Expand description

Trait for retrieving resources from external sources.

Implementors of this trait can be used to fetch resources that are not initially present in a crate::Registry.

Required Methods§

Source

fn retrieve( &self, uri: &Uri<String>, ) -> Result<Value, Box<dyn Error + Sync + Send>>

Attempt to retrieve a resource from the given URI.

§Arguments
  • uri - The URI of the resource to retrieve.
§Errors

This method can fail for various reasons:

  • Resource not found
  • Network errors (for remote resources)
  • Permission errors

Implementors§