pub struct AdminSynchronousProxy { /* private fields */ }
Implementations§
Source§impl AdminSynchronousProxy
impl AdminSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<AdminEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<AdminEvent, 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 power_fully_on(
&self,
___deadline: MonotonicInstant,
) -> Result<AdminPowerFullyOnResult, Error>
pub fn power_fully_on( &self, ___deadline: MonotonicInstant, ) -> Result<AdminPowerFullyOnResult, Error>
Asks the device to enter a fully on state.
Sourcepub fn shutdown(
&self,
options: &ShutdownOptions,
___deadline: MonotonicInstant,
) -> Result<AdminShutdownResult, Error>
pub fn shutdown( &self, options: &ShutdownOptions, ___deadline: MonotonicInstant, ) -> Result<AdminShutdownResult, Error>
Asks the device to enter the state specified by options.action
.
Arguments:
- options: The options with which to perform this request.
ZX_ERR_INVALID_ARGS
is returned ifaction
is absent.reasons
may be omitted, but adding a new enum value instead is strongly encouraged.
Sourcepub fn reboot(
&self,
reason: RebootReason,
___deadline: MonotonicInstant,
) -> Result<AdminRebootResult, Error>
pub fn reboot( &self, reason: RebootReason, ___deadline: MonotonicInstant, ) -> Result<AdminRebootResult, Error>
Asks the device to reboot.
Replaced by PerformReboot
.
Sourcepub fn perform_reboot(
&self,
options: &RebootOptions,
___deadline: MonotonicInstant,
) -> Result<AdminPerformRebootResult, Error>
pub fn perform_reboot( &self, options: &RebootOptions, ___deadline: MonotonicInstant, ) -> Result<AdminPerformRebootResult, Error>
Asks the device to reboot.
Arguments:
- options: The options with which to perform this requests.
ZX_ERR_INVALID_ARGS
is returned if the options are malformed (i.e.reasons
is absent or empty).
§Deprecation
Use Shutdown, which allows callers to specify the intended action and reasons for the action.
Sourcepub fn reboot_to_bootloader(
&self,
___deadline: MonotonicInstant,
) -> Result<AdminRebootToBootloaderResult, Error>
pub fn reboot_to_bootloader( &self, ___deadline: MonotonicInstant, ) -> Result<AdminRebootToBootloaderResult, Error>
Asks the device to reboot into the bootloader.
§Deprecation
Use Shutdown, which allows callers to specify reasons why they are requesting a reboot to bootloader.
Sourcepub fn reboot_to_recovery(
&self,
___deadline: MonotonicInstant,
) -> Result<AdminRebootToRecoveryResult, Error>
pub fn reboot_to_recovery( &self, ___deadline: MonotonicInstant, ) -> Result<AdminRebootToRecoveryResult, Error>
Asks the device to reboot into the recovery partition.
§Deprecation
Use Shutdown, which allows callers to specify reasons why they are requesting a reboot to recovery.
Sourcepub fn poweroff(
&self,
___deadline: MonotonicInstant,
) -> Result<AdminPoweroffResult, Error>
pub fn poweroff( &self, ___deadline: MonotonicInstant, ) -> Result<AdminPoweroffResult, Error>
Asks all devices to enter a powered off state.
§Deprecation
Use Shutdown, which allows callers to specify reasons why they are requesting a poweroff.
Sourcepub fn mexec(
&self,
kernel_zbi: Vmo,
data_zbi: Vmo,
___deadline: MonotonicInstant,
) -> Result<AdminMexecResult, Error>
pub fn mexec( &self, kernel_zbi: Vmo, data_zbi: Vmo, ___deadline: MonotonicInstant, ) -> Result<AdminMexecResult, Error>
Performs a kernel mexec.
It is expected that the ZBI items specified by
zx_system_mexec_payload_get()
have not yet been appended to the
provided data ZBI.
Sourcepub fn suspend_to_ram(
&self,
___deadline: MonotonicInstant,
) -> Result<AdminSuspendToRamResult, Error>
pub fn suspend_to_ram( &self, ___deadline: MonotonicInstant, ) -> Result<AdminSuspendToRamResult, Error>
Asks the device to enter the suspend to RAM (S3) power state. Currently only supported on x64. If a system state transition is already in progress then ZX_ERR_ALREADY_EXISTS is returned. If the device fails to reach the suspend power state then ZX_ERR_INTERNAL is returned. If the device successfully suspends, ZX_OK is returned when the device resumes.
Trait Implementations§
Source§impl Debug for AdminSynchronousProxy
impl Debug for AdminSynchronousProxy
Source§impl From<AdminSynchronousProxy> for Handle
Available on Fuchsia only.
impl From<AdminSynchronousProxy> for Handle
Source§fn from(value: AdminSynchronousProxy) -> Self
fn from(value: AdminSynchronousProxy) -> Self
Source§impl From<Channel> for AdminSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for AdminSynchronousProxy
Source§impl FromClient for AdminSynchronousProxy
Available on Fuchsia only.
impl FromClient for AdminSynchronousProxy
Source§type Protocol = AdminMarker
type Protocol = AdminMarker
Source§fn from_client(value: ClientEnd<AdminMarker>) -> Self
fn from_client(value: ClientEnd<AdminMarker>) -> Self
Source§impl SynchronousProxy for AdminSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for AdminSynchronousProxy
Source§type Proxy = AdminProxy
type Proxy = AdminProxy
Source§type Protocol = AdminMarker
type Protocol = AdminMarker
Proxy
controls.