Struct fidl_fuchsia_pkg::RepositoryManagerProxy
source · pub struct RepositoryManagerProxy { /* private fields */ }
Implementations§
source§impl RepositoryManagerProxy
impl RepositoryManagerProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.pkg/RepositoryManager.
sourcepub fn take_event_stream(&self) -> RepositoryManagerEventStream
pub fn take_event_stream(&self) -> RepositoryManagerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn add(
&self,
repo: &RepositoryConfig
) -> QueryResponseFut<RepositoryManagerAddResult>
pub fn add( &self, repo: &RepositoryConfig ) -> QueryResponseFut<RepositoryManagerAddResult>
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.
sourcepub fn remove(
&self,
repo_url: &str
) -> QueryResponseFut<RepositoryManagerRemoveResult>
pub fn remove( &self, repo_url: &str ) -> QueryResponseFut<RepositoryManagerRemoveResult>
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.
sourcepub fn add_mirror(
&self,
repo_url: &str,
mirror: &MirrorConfig
) -> QueryResponseFut<RepositoryManagerAddMirrorResult>
pub fn add_mirror( &self, repo_url: &str, mirror: &MirrorConfig ) -> QueryResponseFut<RepositoryManagerAddMirrorResult>
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.
sourcepub fn remove_mirror(
&self,
repo_url: &str,
mirror_url: &str
) -> QueryResponseFut<RepositoryManagerRemoveMirrorResult>
pub fn remove_mirror( &self, repo_url: &str, mirror_url: &str ) -> QueryResponseFut<RepositoryManagerRemoveMirrorResult>
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.
sourcepub fn list(
&self,
iterator: ServerEnd<RepositoryIteratorMarker>
) -> Result<(), Error>
pub fn list( &self, iterator: ServerEnd<RepositoryIteratorMarker> ) -> Result<(), Error>
Returns an iterator over all repositories.
- request
iterator
a request for an iterator.
Trait Implementations§
source§impl Clone for RepositoryManagerProxy
impl Clone for RepositoryManagerProxy
source§fn clone(&self) -> RepositoryManagerProxy
fn clone(&self) -> RepositoryManagerProxy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RepositoryManagerProxy
impl Debug for RepositoryManagerProxy
source§impl Proxy for RepositoryManagerProxy
impl Proxy for RepositoryManagerProxy
§type Protocol = RepositoryManagerMarker
type Protocol = RepositoryManagerMarker
The protocol which this
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Attempt to convert the proxy back into a client end. Read more
source§impl RepositoryManagerProxyInterface for RepositoryManagerProxy
impl RepositoryManagerProxyInterface for RepositoryManagerProxy
type AddResponseFut = QueryResponseFut<Result<(), i32>>
fn add(&self, repo: &RepositoryConfig) -> Self::AddResponseFut
type RemoveResponseFut = QueryResponseFut<Result<(), i32>>
fn remove(&self, repo_url: &str) -> Self::RemoveResponseFut
type AddMirrorResponseFut = QueryResponseFut<Result<(), i32>>
fn add_mirror( &self, repo_url: &str, mirror: &MirrorConfig ) -> Self::AddMirrorResponseFut
type RemoveMirrorResponseFut = QueryResponseFut<Result<(), i32>>
fn remove_mirror( &self, repo_url: &str, mirror_url: &str ) -> Self::RemoveMirrorResponseFut
fn list( &self, iterator: ServerEnd<RepositoryIteratorMarker> ) -> Result<(), Error>
Auto Trait Implementations§
impl !RefUnwindSafe for RepositoryManagerProxy
impl Send for RepositoryManagerProxy
impl Sync for RepositoryManagerProxy
impl Unpin for RepositoryManagerProxy
impl !UnwindSafe for RepositoryManagerProxy
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