pub struct UrlResolverClient { /* private fields */ }Implementations§
Source§impl UrlResolverClient
impl UrlResolverClient
pub fn new() -> Self
pub fn with_timeout(timeout_secs: u64) -> Self
Sourcepub async fn resolve(
&self,
url: &str,
method: &HttpMethod,
) -> Result<Value, Box<dyn Error + Send + Sync>>
pub async fn resolve( &self, url: &str, method: &HttpMethod, ) -> Result<Value, Box<dyn Error + Send + Sync>>
Resolve a URL and return the parsed JSON response
Sourcepub async fn resolve_with_extract(
&self,
url: &str,
method: &HttpMethod,
extract_path: Option<&str>,
) -> Result<Value, Box<dyn Error + Send + Sync>>
pub async fn resolve_with_extract( &self, url: &str, method: &HttpMethod, extract_path: Option<&str>, ) -> Result<Value, Box<dyn Error + Send + Sync>>
Resolve a URL and extract a specific JSON path from the response
Sourcepub fn extract_json_path(
value: &Value,
path: &str,
) -> Result<Value, Box<dyn Error + Send + Sync>>
pub fn extract_json_path( value: &Value, path: &str, ) -> Result<Value, Box<dyn Error + Send + Sync>>
Extract a value from a JSON object using dot-notation path e.g., “data.image” extracts response[“data”][“image”]
Sourcepub async fn resolve_batch(
&self,
urls: &[(String, HttpMethod)],
) -> HashMap<String, Value>
pub async fn resolve_batch( &self, urls: &[(String, HttpMethod)], ) -> HashMap<String, Value>
Batch resolve multiple URLs in parallel with deduplication. Returns raw JSON keyed by URL. Identical URLs are only fetched once.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UrlResolverClient
impl !RefUnwindSafe for UrlResolverClient
impl Send for UrlResolverClient
impl Sync for UrlResolverClient
impl Unpin for UrlResolverClient
impl UnsafeUnpin for UrlResolverClient
impl !UnwindSafe for UrlResolverClient
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