pub struct GemView { /* private fields */ }Expand description
Typed view over the gem sub-index. Built once; get is O(1).
Implementations§
Source§impl GemView
impl GemView
Sourcepub fn get(&self, name: &str, version: &str) -> Option<GemPackage>
pub fn get(&self, name: &str, version: &str) -> Option<GemPackage>
O(1) lookup of the ruby-platform gem for a (name, version).
Sourcepub fn get_platform(
&self,
name: &str,
version: &str,
platform: &str,
) -> Option<GemPackage>
pub fn get_platform( &self, name: &str, version: &str, platform: &str, ) -> Option<GemPackage>
O(1) lookup of a specific platform (java, x86_64-linux, …).
Sourcepub fn list(&self) -> Vec<(String, String, String)>
pub fn list(&self) -> Vec<(String, String, String)>
Authoritative (name, version, platform) coords of every gem in the view.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Auto Trait Implementations§
impl Freeze for GemView
impl RefUnwindSafe for GemView
impl Send for GemView
impl Sync for GemView
impl Unpin for GemView
impl UnsafeUnpin for GemView
impl UnwindSafe for GemView
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