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, DefaultFuchsiaResourceDialect>
pub fn add( &self, repo: &RepositoryConfig, ) -> QueryResponseFut<RepositoryManagerAddResult, DefaultFuchsiaResourceDialect>
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, DefaultFuchsiaResourceDialect>
pub fn remove( &self, repo_url: &str, ) -> QueryResponseFut<RepositoryManagerRemoveResult, DefaultFuchsiaResourceDialect>
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, DefaultFuchsiaResourceDialect>
pub fn add_mirror( &self, repo_url: &str, mirror: &MirrorConfig, ) -> QueryResponseFut<RepositoryManagerAddMirrorResult, DefaultFuchsiaResourceDialect>
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, DefaultFuchsiaResourceDialect>
pub fn remove_mirror( &self, repo_url: &str, mirror_url: &str, ) -> QueryResponseFut<RepositoryManagerRemoveMirrorResult, DefaultFuchsiaResourceDialect>
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
Source§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>>
type RemoveResponseFut = QueryResponseFut<Result<(), i32>>
type AddMirrorResponseFut = QueryResponseFut<Result<(), i32>>
type RemoveMirrorResponseFut = QueryResponseFut<Result<(), i32>>
fn add(&self, repo: &RepositoryConfig) -> Self::AddResponseFut
fn remove(&self, repo_url: &str) -> Self::RemoveResponseFut
fn add_mirror( &self, repo_url: &str, mirror: &MirrorConfig, ) -> Self::AddMirrorResponseFut
fn remove_mirror( &self, repo_url: &str, mirror_url: &str, ) -> Self::RemoveMirrorResponseFut
fn list( &self, iterator: ServerEnd<RepositoryIteratorMarker>, ) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for RepositoryManagerProxy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ProxyHasClient for Twhere
T: Proxy,
impl<T> ProxyHasClient for Twhere
T: Proxy,
§fn client(&self) -> Result<ZirconClient, Infallible>
fn client(&self) -> Result<ZirconClient, Infallible>
Get a “client” for this proxy. This is just an object which has methods
for a few common handle creation operations.