pub struct RepositoryManagerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl RepositoryManagerSynchronousProxy
impl RepositoryManagerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<RepositoryManagerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<RepositoryManagerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn add(
&self,
repo: &RepositoryConfig,
___deadline: MonotonicInstant,
) -> Result<RepositoryManagerAddResult, Error>
pub fn add( &self, repo: &RepositoryConfig, ___deadline: MonotonicInstant, ) -> Result<RepositoryManagerAddResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<RepositoryManagerRemoveResult, Error>
pub fn remove( &self, repo_url: &str, ___deadline: MonotonicInstant, ) -> Result<RepositoryManagerRemoveResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<RepositoryManagerAddMirrorResult, Error>
pub fn add_mirror( &self, repo_url: &str, mirror: &MirrorConfig, ___deadline: MonotonicInstant, ) -> Result<RepositoryManagerAddMirrorResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<RepositoryManagerRemoveMirrorResult, Error>
pub fn remove_mirror( &self, repo_url: &str, mirror_url: &str, ___deadline: MonotonicInstant, ) -> Result<RepositoryManagerRemoveMirrorResult, Error>
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 SynchronousProxy for RepositoryManagerSynchronousProxy
impl SynchronousProxy for RepositoryManagerSynchronousProxy
Source§type Proxy = RepositoryManagerProxy
type Proxy = RepositoryManagerProxy
The async proxy for the same protocol.
Source§type Protocol = RepositoryManagerMarker
type Protocol = RepositoryManagerMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for RepositoryManagerSynchronousProxy
impl RefUnwindSafe for RepositoryManagerSynchronousProxy
impl Send for RepositoryManagerSynchronousProxy
impl Sync for RepositoryManagerSynchronousProxy
impl Unpin for RepositoryManagerSynchronousProxy
impl UnwindSafe for RepositoryManagerSynchronousProxy
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