polywrap_core 0.1.11

Core types of Polywrap client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::sync::{Arc, Mutex};

use crate::{
    error::Error,
    resolution::uri_resolution_context::{UriPackageOrWrapper, UriResolutionContext},
    uri::Uri,
};

/// Trait that defines an object that can handle URI resolution.
pub trait UriResolverHandler {
    fn try_resolve_uri(
        &self,
        uri: &Uri,
        resolution_context: Option<Arc<Mutex<UriResolutionContext>>>,
    ) -> Result<UriPackageOrWrapper, Error>;
}