pub struct InstallerProxy { /* private fields */ }
Implementations§
Source§impl InstallerProxy
impl InstallerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.update.installer/Installer.
Sourcepub fn take_event_stream(&self) -> InstallerEventStream
pub fn take_event_stream(&self) -> InstallerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_last_update_result(
&self,
) -> QueryResponseFut<UpdateResult, DefaultFuchsiaResourceDialect>
pub fn get_last_update_result( &self, ) -> QueryResponseFut<UpdateResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<UpdateResult, DefaultFuchsiaResourceDialect>
pub fn get_update_result( &self, attempt_id: &str, ) -> QueryResponseFut<UpdateResult, DefaultFuchsiaResourceDialect>
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>>,
) -> QueryResponseFut<InstallerStartUpdateResult, DefaultFuchsiaResourceDialect>
pub fn start_update( &self, url: &PackageUrl, options: &Options, monitor: ClientEnd<MonitorMarker>, reboot_controller: Option<ServerEnd<RebootControllerMarker>>, ) -> QueryResponseFut<InstallerStartUpdateResult, DefaultFuchsiaResourceDialect>
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>,
) -> QueryResponseFut<bool, DefaultFuchsiaResourceDialect>
pub fn monitor_update( &self, attempt_id: Option<&str>, monitor: ClientEnd<MonitorMarker>, ) -> QueryResponseFut<bool, DefaultFuchsiaResourceDialect>
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>,
) -> QueryResponseFut<InstallerSuspendUpdateResult, DefaultFuchsiaResourceDialect>
pub fn suspend_update( &self, attempt_id: Option<&str>, ) -> QueryResponseFut<InstallerSuspendUpdateResult, DefaultFuchsiaResourceDialect>
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>,
) -> QueryResponseFut<InstallerResumeUpdateResult, DefaultFuchsiaResourceDialect>
pub fn resume_update( &self, attempt_id: Option<&str>, ) -> QueryResponseFut<InstallerResumeUpdateResult, DefaultFuchsiaResourceDialect>
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>,
) -> QueryResponseFut<InstallerCancelUpdateResult, DefaultFuchsiaResourceDialect>
pub fn cancel_update( &self, attempt_id: Option<&str>, ) -> QueryResponseFut<InstallerCancelUpdateResult, DefaultFuchsiaResourceDialect>
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 Clone for InstallerProxy
impl Clone for InstallerProxy
Source§fn clone(&self) -> InstallerProxy
fn clone(&self) -> InstallerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InstallerProxy
impl Debug for InstallerProxy
Source§impl InstallerProxyInterface for InstallerProxy
impl InstallerProxyInterface for InstallerProxy
type GetLastUpdateResultResponseFut = QueryResponseFut<UpdateResult>
type GetUpdateResultResponseFut = QueryResponseFut<UpdateResult>
type StartUpdateResponseFut = QueryResponseFut<Result<String, UpdateNotStartedReason>>
type MonitorUpdateResponseFut = QueryResponseFut<bool>
type SuspendUpdateResponseFut = QueryResponseFut<Result<(), SuspendError>>
type ResumeUpdateResponseFut = QueryResponseFut<Result<(), ResumeError>>
type CancelUpdateResponseFut = QueryResponseFut<Result<(), CancelError>>
fn get_last_update_result(&self) -> Self::GetLastUpdateResultResponseFut
fn get_update_result( &self, attempt_id: &str, ) -> Self::GetUpdateResultResponseFut
fn start_update( &self, url: &PackageUrl, options: &Options, monitor: ClientEnd<MonitorMarker>, reboot_controller: Option<ServerEnd<RebootControllerMarker>>, ) -> Self::StartUpdateResponseFut
fn monitor_update( &self, attempt_id: Option<&str>, monitor: ClientEnd<MonitorMarker>, ) -> Self::MonitorUpdateResponseFut
fn suspend_update( &self, attempt_id: Option<&str>, ) -> Self::SuspendUpdateResponseFut
fn resume_update( &self, attempt_id: Option<&str>, ) -> Self::ResumeUpdateResponseFut
fn cancel_update( &self, attempt_id: Option<&str>, ) -> Self::CancelUpdateResponseFut
Source§impl Proxy for InstallerProxy
impl Proxy for InstallerProxy
Source§type Protocol = InstallerMarker
type Protocol = InstallerMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Auto Trait Implementations§
impl Freeze for InstallerProxy
impl !RefUnwindSafe for InstallerProxy
impl Send for InstallerProxy
impl Sync for InstallerProxy
impl Unpin for InstallerProxy
impl !UnwindSafe for InstallerProxy
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
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)
clone_to_uninit
)