pub enum RepositoryManagerRequest {
Add {
repo: RepositoryConfig,
responder: RepositoryManagerAddResponder,
},
Remove {
repo_url: String,
responder: RepositoryManagerRemoveResponder,
},
AddMirror {
repo_url: String,
mirror: MirrorConfig,
responder: RepositoryManagerAddMirrorResponder,
},
RemoveMirror {
repo_url: String,
mirror_url: String,
responder: RepositoryManagerRemoveMirrorResponder,
},
List {
iterator: ServerEnd<RepositoryIteratorMarker>,
control_handle: RepositoryManagerControlHandle,
},
}
Expand description
This manages package repositories.
This is intended to be implemented by package resolver components, and used by repository administration tools.
Variants§
Add
Adds a repository. This will overwrite the repository if it already exists.
- request
repo
a repository to add to the resolver.
- error a zx_status value indicating failure. One of the following:
ZX_ERR_ACCESS_DENIED
if editing repositories is permanently disabled.ZX_ERR_ALREADY_EXISTS
if the repository already exists.ZX_ERR_INVALID_ARGS
if the repository is malformed.
Remove
Removes a repository.
Removing a repository will prevent future packages from being cached from this repository, but in-flight downloads may not be interrupted.
- request
repo_url
the URL of the repository we want to remove.
- error a zx_status value indicating failure. One of the following:
ZX_ERR_ACCESS_DENIED
if editing repositories is permanently disabled or therepo_url
matches a static repository.ZX_ERR_INVALID_ARGS
if therepo_url
is malformed.ZX_ERR_NOT_FOUND
if the repository does not exist.
AddMirror
Adds a mirror to a repository. This will overwrite the mirror if it already exists.
- request
repo_url
the URL of the repository to add the mirror to. - request
mirror
the mirror config used to add the mirror.
- error a zx_status value indicating failure. One of the following:
ZX_ERR_ALREADY_EXISTS
if the mirror for this repository already exists.ZX_ERR_INVALID_ARGS
if therepo_url
or themirror
is malformed.ZX_ERR_NOT_FOUND
if the repository does not exist.
RemoveMirror
Removes a mirror from a repository.
Removing a mirror will prevent future packages from being cached from that mirror, but in-flight downloads may not be interrupted.
- request
repo_url
the URL of the mirror’s repository. - request
mirror_url
the URL of the mirror we want to remove.
- error a zx_status value indicating failure. One of the following:
ZX_ERR_INVALID_ARGS
if therepo_url
or themirror_url
is malformed.ZX_ERR_NOT_FOUND
if the repository or mirror does not exist.
List
Returns an iterator over all repositories.
- request
iterator
a request for an iterator.
Implementations§
source§impl RepositoryManagerRequest
impl RepositoryManagerRequest
pub fn into_add( self, ) -> Option<(RepositoryConfig, RepositoryManagerAddResponder)>
pub fn into_remove(self) -> Option<(String, RepositoryManagerRemoveResponder)>
pub fn into_add_mirror( self, ) -> Option<(String, MirrorConfig, RepositoryManagerAddMirrorResponder)>
pub fn into_remove_mirror( self, ) -> Option<(String, String, RepositoryManagerRemoveMirrorResponder)>
pub fn into_list( self, ) -> Option<(ServerEnd<RepositoryIteratorMarker>, RepositoryManagerControlHandle)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RepositoryManagerRequest
impl !RefUnwindSafe for RepositoryManagerRequest
impl Send for RepositoryManagerRequest
impl Sync for RepositoryManagerRequest
impl Unpin for RepositoryManagerRequest
impl !UnwindSafe for RepositoryManagerRequest
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