pub struct RegistryClient { /* private fields */ }Expand description
Registry client for fetching rpack metadata from registry.rgen.dev
Implementations§
Source§impl RegistryClient
impl RegistryClient
Sourcepub fn with_base_url(base_url: Url) -> Result<Self>
pub fn with_base_url(base_url: Url) -> Result<Self>
Create a registry client with custom base URL (for testing)
Sourcepub async fn fetch_index(&self) -> Result<RegistryIndex>
pub async fn fetch_index(&self) -> Result<RegistryIndex>
Fetch the registry index
Sourcepub async fn search(&self, query: &str) -> Result<Vec<SearchResult>>
pub async fn search(&self, query: &str) -> Result<Vec<SearchResult>>
Search for rpacks matching the query
Sourcepub async fn advanced_search(
&self,
params: &SearchParams<'_>,
) -> Result<Vec<SearchResult>>
pub async fn advanced_search( &self, params: &SearchParams<'_>, ) -> Result<Vec<SearchResult>>
Advanced search with filtering options
Sourcepub async fn resolve(
&self,
pack_id: &str,
version: Option<&str>,
) -> Result<ResolvedPack>
pub async fn resolve( &self, pack_id: &str, version: Option<&str>, ) -> Result<ResolvedPack>
Resolve a pack ID to a specific version
Sourcepub async fn check_updates(
&self,
pack_id: &str,
current_version: &str,
) -> Result<Option<ResolvedPack>>
pub async fn check_updates( &self, pack_id: &str, current_version: &str, ) -> Result<Option<ResolvedPack>>
Check if a pack has updates available
Trait Implementations§
Source§impl Clone for RegistryClient
impl Clone for RegistryClient
Source§fn clone(&self) -> RegistryClient
fn clone(&self) -> RegistryClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RegistryClient
impl !RefUnwindSafe for RegistryClient
impl Send for RegistryClient
impl Sync for RegistryClient
impl Unpin for RegistryClient
impl !UnwindSafe for RegistryClient
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