pub struct RemoteResolver { /* private fields */ }Expand description
A reusable remote-resolution engine for one run (a Bundle or an NDJSON stream).
Holds the RemoteResolveConfig, a bounded LRU cache of fetched resource JSON
(with negative caching of misses), and a fetch counter. Sharing one instance
across a stream’s chunks means a reference seen in many chunks is fetched once,
and max_fetches is enforced across the whole run.
Implementations§
Source§impl RemoteResolver
impl RemoteResolver
Sourcepub fn new(config: RemoteResolveConfig) -> Self
pub fn new(config: RemoteResolveConfig) -> Self
Creates a resolver with an empty cache sized to config.cache_max_entries.
Sourcepub async fn resolve(
&self,
seed_refs: Vec<String>,
local_keys: &BTreeSet<String>,
version: FhirVersion,
) -> Vec<FhirResource>
pub async fn resolve( &self, seed_refs: Vec<String>, local_keys: &BTreeSet<String>, version: FhirVersion, ) -> Vec<FhirResource>
Resolves seed_refs — and, within max_depth, references discovered inside
fetched resources — returning the parsed external resources to fold into a
resolution pool. References already resolvable in local_keys are skipped.
Auto Trait Implementations§
impl !Freeze for RemoteResolver
impl RefUnwindSafe for RemoteResolver
impl Send for RemoteResolver
impl Sync for RemoteResolver
impl Unpin for RemoteResolver
impl UnsafeUnpin for RemoteResolver
impl UnwindSafe for RemoteResolver
Blanket Implementations§
impl<T> Allocation for T
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more