pub struct InstallerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl InstallerSynchronousProxy
impl InstallerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<InstallerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<InstallerEvent, 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 get_last_update_result(
&self,
___deadline: MonotonicInstant,
) -> Result<UpdateResult, Error>
pub fn get_last_update_result( &self, ___deadline: MonotonicInstant, ) -> Result<UpdateResult, Error>
Get the status of the last update attempt. If this device hasn’t attempted an update since the last factory reset, every field in the result will be absent.
- response
info
the status of the last update attempt, if available.
Sourcepub fn get_update_result(
&self,
attempt_id: &str,
___deadline: MonotonicInstant,
) -> Result<UpdateResult, Error>
pub fn get_update_result( &self, attempt_id: &str, ___deadline: MonotonicInstant, ) -> Result<UpdateResult, Error>
Get the status of the given update attempt, if it exists. If this device
hasn’t attempted an update with the given attempt_id
or forgotten about
that attempt, every field in the result will be absent.
- request
attempt_id
UUID identifying the requested update attempt.
- response
info
the status of the last update attempt, if available.
Sourcepub fn start_update(
&self,
url: &PackageUrl,
options: &Options,
monitor: ClientEnd<MonitorMarker>,
reboot_controller: Option<ServerEnd<RebootControllerMarker>>,
___deadline: MonotonicInstant,
) -> Result<InstallerStartUpdateResult, Error>
pub fn start_update( &self, url: &PackageUrl, options: &Options, monitor: ClientEnd<MonitorMarker>, reboot_controller: Option<ServerEnd<RebootControllerMarker>>, ___deadline: MonotonicInstant, ) -> Result<InstallerStartUpdateResult, Error>
Start an update if one is not running, or attach to a pending update
attempt if one is running and
[Options.allow_attach_to_existing_attempt
] is true. If an update
attempt is started or attached to, provide status updates through
monitor
.
- request
url
The fuchsia-pkg URL of the update package to update to. - request
options
Configuration options for this update attempt. Ignored or merged with the existingoptions
if an update attempt is already in progress. - request
monitor
A protocol on which to receive progress updates. - request
reboot_controller
An optional protocol to control the timing of the reboot into the update system. If not provided, the update attempt will initiate the reboot as soon as it is ready.
- response
attempt_id
UUID identifying this update attempt. For updates that require a reboot, components may use this identifier to disambiguate the completion of this update attempt from new update attempts that start post-reboot.
Sourcepub fn monitor_update(
&self,
attempt_id: Option<&str>,
monitor: ClientEnd<MonitorMarker>,
___deadline: MonotonicInstant,
) -> Result<bool, Error>
pub fn monitor_update( &self, attempt_id: Option<&str>, monitor: ClientEnd<MonitorMarker>, ___deadline: MonotonicInstant, ) -> Result<bool, Error>
Attempt to monitor a specific update attempt, if it exists. This request will not start an update if one is not already running.
- request
attempt_id
UUID identifying the requested update attempt. If not given, monitor any active update attempt. - request
monitor
A protocol on which to receive progress updates.
- response
attached
Whether or not the provided monitor was attached to an in-progress update attempt. If false, monitor will be closed by the server.
Sourcepub fn suspend_update(
&self,
attempt_id: Option<&str>,
___deadline: MonotonicInstant,
) -> Result<InstallerSuspendUpdateResult, Error>
pub fn suspend_update( &self, attempt_id: Option<&str>, ___deadline: MonotonicInstant, ) -> Result<InstallerSuspendUpdateResult, Error>
Suspend a specific update attempt, if it exists.
- request
attempt_id
UUID identifying the requested update attempt. If not given, suspend any active update attempt.
Sourcepub fn resume_update(
&self,
attempt_id: Option<&str>,
___deadline: MonotonicInstant,
) -> Result<InstallerResumeUpdateResult, Error>
pub fn resume_update( &self, attempt_id: Option<&str>, ___deadline: MonotonicInstant, ) -> Result<InstallerResumeUpdateResult, Error>
Resume a specific update attempt, if it exists.
- request
attempt_id
UUID identifying the requested update attempt. If not given, resume any active update attempt.
Sourcepub fn cancel_update(
&self,
attempt_id: Option<&str>,
___deadline: MonotonicInstant,
) -> Result<InstallerCancelUpdateResult, Error>
pub fn cancel_update( &self, attempt_id: Option<&str>, ___deadline: MonotonicInstant, ) -> Result<InstallerCancelUpdateResult, Error>
Cancel a specific update attempt, if it exists.
- request
attempt_id
UUID identifying the requested update attempt. If not given, cancel any active update attempt.
Trait Implementations§
Source§impl Debug for InstallerSynchronousProxy
impl Debug for InstallerSynchronousProxy
Source§impl SynchronousProxy for InstallerSynchronousProxy
impl SynchronousProxy for InstallerSynchronousProxy
Source§type Proxy = InstallerProxy
type Proxy = InstallerProxy
Source§type Protocol = InstallerMarker
type Protocol = InstallerMarker
Proxy
controls.