pub struct LocalRegistry;Expand description
A registry that reads package data from the local filesystem.
LocalRegistry expects metadata containing a "path" field pointing to a
local file or directory. Supported sources are:
.ziparchives containing a Thunderstore-stylemanifest.json- Unpacked directories with a Thunderstore
manifest.json .dllfiles (version extracted from metadata or filename)- Other files (version extracted from metadata or filename)
§Examples
use loadsmith_registry::LocalRegistry;
let registry = LocalRegistry::new();
assert!(format!("{registry:?}").contains("LocalRegistry"));Implementations§
Trait Implementations§
Source§impl Debug for LocalRegistry
impl Debug for LocalRegistry
Source§impl Default for LocalRegistry
impl Default for LocalRegistry
Source§impl Registry for LocalRegistry
impl Registry for LocalRegistry
Source§fn version_info<'a>(
&'a self,
id: &'a PackageId,
metadata: Option<&'a Value>,
) -> Pin<Box<dyn Future<Output = Result<Vec<VersionInfo>>> + 'a>>
fn version_info<'a>( &'a self, id: &'a PackageId, metadata: Option<&'a Value>, ) -> Pin<Box<dyn Future<Output = Result<Vec<VersionInfo>>> + 'a>>
List all available versions of the package identified by
id. Read moreSource§fn resolve<'a>(
&'a self,
ref_: &'a PackageRef,
metadata: Option<&'a Value>,
) -> Pin<Box<dyn Future<Output = Result<ResolvedVersion>> + 'a>>
fn resolve<'a>( &'a self, ref_: &'a PackageRef, metadata: Option<&'a Value>, ) -> Pin<Box<dyn Future<Output = Result<ResolvedVersion>> + 'a>>
Resolve a package reference into concrete download information. Read more
Source§fn revalidate_checksum<'a>(
&'a self,
ref_: &'a PackageRef,
metadata: Option<&'a Value>,
) -> Result<Option<Checksum>>
fn revalidate_checksum<'a>( &'a self, ref_: &'a PackageRef, metadata: Option<&'a Value>, ) -> Result<Option<Checksum>>
Re-compute and return the checksum for the package identified by
ref_,
or return None if the registry does not support checksum revalidation. Read moreAuto Trait Implementations§
impl Freeze for LocalRegistry
impl RefUnwindSafe for LocalRegistry
impl Send for LocalRegistry
impl Sync for LocalRegistry
impl Unpin for LocalRegistry
impl UnsafeUnpin for LocalRegistry
impl UnwindSafe for LocalRegistry
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