pub struct Registry {
pub base_url: String,
}Expand description
An npm-compatible registry. Defaults to the public registry.
Fields§
§base_url: StringImplementations§
Source§impl Registry
impl Registry
Sourcepub fn with_base_url(base_url: impl Into<String>) -> Self
pub fn with_base_url(base_url: impl Into<String>) -> Self
A registry at a custom base URL (e.g. a private mirror).
Sourcepub fn tarball_url(&self, name: &str, version: &str) -> String
pub fn tarball_url(&self, name: &str, version: &str) -> String
Conventional tarball URL for an exact version. Handles scoped names:
@scope/pkg → <base>/@scope/pkg/-/pkg-<version>.tgz.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
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