pub struct PackageDownloader { /* private fields */ }Expand description
FHIR package loader for downloading from npm-style registries.
Implementations§
Source§impl PackageLoader
impl PackageLoader
Sourcepub fn new(config: LoaderConfig) -> Result<PackageLoader, LoaderError>
pub fn new(config: LoaderConfig) -> Result<PackageLoader, LoaderError>
Create a new package loader with the given configuration.
pub fn is_package_downloaded( &self, package_name: &str, version: &str, output_dir: &Path, ) -> Result<bool, LoaderError>
Sourcepub async fn download_package(
&self,
package_name: &str,
version: &str,
extract_to: &Path,
) -> Result<PackageManifest, LoaderError>
pub async fn download_package( &self, package_name: &str, version: &str, extract_to: &Path, ) -> Result<PackageManifest, LoaderError>
Download a FHIR package and extract it to the specified directory.
Sourcepub fn get_default_packages_dir() -> Result<PathBuf, LoaderError>
pub fn get_default_packages_dir() -> Result<PathBuf, LoaderError>
Get the default FHIR packages directory (~/.fhir/packages).
Sourcepub async fn list_versions(
&self,
package_name: &str,
) -> Result<Vec<String>, LoaderError>
pub async fn list_versions( &self, package_name: &str, ) -> Result<Vec<String>, LoaderError>
List available versions for a package.
Sourcepub async fn get_latest_version(
&self,
package_name: &str,
) -> Result<String, LoaderError>
pub async fn get_latest_version( &self, package_name: &str, ) -> Result<String, LoaderError>
Get the latest version for a package.
Auto Trait Implementations§
impl !RefUnwindSafe for PackageLoader
impl !UnwindSafe for PackageLoader
impl Freeze for PackageLoader
impl Send for PackageLoader
impl Sync for PackageLoader
impl Unpin for PackageLoader
impl UnsafeUnpin for PackageLoader
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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