pub struct LocalRegistry { /* private fields */ }Implementations§
Source§impl LocalRegistry
impl LocalRegistry
pub fn open() -> Result<Self, String>
pub fn open_at(root: &Path) -> Result<Self, String>
pub fn root(&self) -> &Path
pub fn install( &self, manifest: &PackageManifest, content: &PackageContent, ) -> Result<PathBuf, String>
pub fn remove(&self, name: &str, version: Option<&str>) -> Result<u32, String>
pub fn list(&self) -> Result<Vec<PackageEntry>, String>
pub fn get( &self, name: &str, version: Option<&str>, ) -> Result<Option<PackageEntry>, String>
pub fn load_package( &self, name: &str, version: &str, ) -> Result<(PackageManifest, PackageContent), String>
pub fn set_auto_load( &self, name: &str, version: &str, auto_load: bool, ) -> Result<(), String>
pub fn auto_load_packages(&self) -> Result<Vec<PackageEntry>, String>
pub fn export_to_file( &self, name: &str, version: &str, output: &Path, ) -> Result<u64, String>
Sourcepub fn export_to_file_signed(
&self,
name: &str,
version: &str,
output: &Path,
signing_key: &SigningKey,
private: bool,
) -> Result<u64, String>
pub fn export_to_file_signed( &self, name: &str, version: &str, output: &Path, signing_key: &SigningKey, private: bool, ) -> Result<u64, String>
Export with a fresh ed25519 signature over the manifest (GL #406) —
required by the hosted registry. The stored package stays untouched;
only the exported bundle carries the signature. private stamps
visibility=private into the bundle for the hosted registry (#524).
pub fn import_from_file(&self, path: &Path) -> Result<PackageManifest, String>
Auto 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more