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
repoa repository to add to the resolver.
- error a zx_status value indicating failure. One of the following:
ZX_ERR_ACCESS_DENIEDif editing repositories is permanently disabled.ZX_ERR_ALREADY_EXISTSif the repository already exists.ZX_ERR_INVALID_ARGSif 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_urlthe URL of the repository we want to remove.
- error a zx_status value indicating failure. One of the following:
ZX_ERR_ACCESS_DENIEDif editing repositories is permanently disabled or therepo_urlmatches a static repository.ZX_ERR_INVALID_ARGSif therepo_urlis malformed.ZX_ERR_NOT_FOUNDif the repository does not exist.
AddMirror
Adds a mirror to a repository. This will overwrite the mirror if it already exists.
- request
repo_urlthe URL of the repository to add the mirror to. - request
mirrorthe mirror config used to add the mirror.
- error a zx_status value indicating failure. One of the following:
ZX_ERR_ALREADY_EXISTSif the mirror for this repository already exists.ZX_ERR_INVALID_ARGSif therepo_urlor themirroris malformed.ZX_ERR_NOT_FOUNDif 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_urlthe URL of the mirror’s repository. - request
mirror_urlthe URL of the mirror we want to remove.
- error a zx_status value indicating failure. One of the following:
ZX_ERR_INVALID_ARGSif therepo_urlor themirror_urlis malformed.ZX_ERR_NOT_FOUNDif the repository or mirror does not exist.
List
Returns an iterator over all repositories.
- request
iteratora 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