pub struct RubyGemsRegistry { /* private fields */ }Expand description
Client for interacting with rubygems.org registry.
Implementations§
Source§impl RubyGemsRegistry
impl RubyGemsRegistry
Sourcepub const fn new(cache: Arc<HttpCache>) -> Self
pub const fn new(cache: Arc<HttpCache>) -> Self
Creates a new registry client with the given HTTP cache.
Sourcepub async fn get_versions(&self, name: &str) -> Result<Vec<BundlerVersion>>
pub async fn get_versions(&self, name: &str) -> Result<Vec<BundlerVersion>>
Fetches all versions for a gem.
Sourcepub async fn get_latest_matching(
&self,
name: &str,
req_str: &str,
) -> Result<Option<BundlerVersion>>
pub async fn get_latest_matching( &self, name: &str, req_str: &str, ) -> Result<Option<BundlerVersion>>
Finds the latest version matching the given requirement.
Sourcepub async fn search(&self, query: &str, limit: usize) -> Result<Vec<GemInfo>>
pub async fn search(&self, query: &str, limit: usize) -> Result<Vec<GemInfo>>
Searches for gems by name/keywords.
Sourcepub async fn get_gem_info(&self, name: &str) -> Result<GemInfo>
pub async fn get_gem_info(&self, name: &str) -> Result<GemInfo>
Gets detailed gem information.
Trait Implementations§
Source§impl Clone for RubyGemsRegistry
impl Clone for RubyGemsRegistry
Source§fn clone(&self) -> RubyGemsRegistry
fn clone(&self) -> RubyGemsRegistry
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 moreSource§impl Registry for RubyGemsRegistry
impl Registry for RubyGemsRegistry
Source§fn get_versions<'a>(
&'a self,
name: &'a str,
) -> BoxFuture<'a, Result<Vec<Box<dyn Version>>>>
fn get_versions<'a>( &'a self, name: &'a str, ) -> BoxFuture<'a, Result<Vec<Box<dyn Version>>>>
Fetches all available versions for a package. Read more
Source§fn get_latest_matching<'a>(
&'a self,
name: &'a str,
req: &'a str,
) -> BoxFuture<'a, Result<Option<Box<dyn Version>>>>
fn get_latest_matching<'a>( &'a self, name: &'a str, req: &'a str, ) -> BoxFuture<'a, Result<Option<Box<dyn Version>>>>
Finds the latest version matching a version requirement. Read more
Source§fn search<'a>(
&'a self,
query: &'a str,
limit: usize,
) -> BoxFuture<'a, Result<Vec<Box<dyn Metadata>>>>
fn search<'a>( &'a self, query: &'a str, limit: usize, ) -> BoxFuture<'a, Result<Vec<Box<dyn Metadata>>>>
Searches for packages by name or keywords. Read more
Source§fn package_url(&self, name: &str) -> String
fn package_url(&self, name: &str) -> String
Package URL for ecosystem (e.g., https://crates.io/crates/serde) Read more
Auto Trait Implementations§
impl Freeze for RubyGemsRegistry
impl !RefUnwindSafe for RubyGemsRegistry
impl Send for RubyGemsRegistry
impl Sync for RubyGemsRegistry
impl Unpin for RubyGemsRegistry
impl UnsafeUnpin for RubyGemsRegistry
impl !UnwindSafe for RubyGemsRegistry
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