pub struct AdminProxy { /* private fields */ }
Implementations§
Source§impl AdminProxy
impl AdminProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.power.statecontrol/Admin.
Sourcepub fn take_event_stream(&self) -> AdminEventStream
pub fn take_event_stream(&self) -> AdminEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn power_fully_on(
&self,
) -> QueryResponseFut<AdminPowerFullyOnResult, DefaultFuchsiaResourceDialect>
pub fn power_fully_on( &self, ) -> QueryResponseFut<AdminPowerFullyOnResult, DefaultFuchsiaResourceDialect>
Asks the device to enter a fully on state.
Sourcepub fn reboot(
&self,
reason: RebootReason,
) -> QueryResponseFut<AdminRebootResult, DefaultFuchsiaResourceDialect>
pub fn reboot( &self, reason: RebootReason, ) -> QueryResponseFut<AdminRebootResult, DefaultFuchsiaResourceDialect>
Asks the device to reboot.
Replaced by PerformReboot
.
Sourcepub fn perform_reboot(
&self,
options: &RebootOptions,
) -> QueryResponseFut<AdminPerformRebootResult, DefaultFuchsiaResourceDialect>
pub fn perform_reboot( &self, options: &RebootOptions, ) -> QueryResponseFut<AdminPerformRebootResult, DefaultFuchsiaResourceDialect>
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).
Sourcepub fn reboot_to_bootloader(
&self,
) -> QueryResponseFut<AdminRebootToBootloaderResult, DefaultFuchsiaResourceDialect>
pub fn reboot_to_bootloader( &self, ) -> QueryResponseFut<AdminRebootToBootloaderResult, DefaultFuchsiaResourceDialect>
Asks the device to reboot into the bootloader.
Sourcepub fn reboot_to_recovery(
&self,
) -> QueryResponseFut<AdminRebootToRecoveryResult, DefaultFuchsiaResourceDialect>
pub fn reboot_to_recovery( &self, ) -> QueryResponseFut<AdminRebootToRecoveryResult, DefaultFuchsiaResourceDialect>
Asks the device to reboot into the recovery partition.
Sourcepub fn poweroff(
&self,
) -> QueryResponseFut<AdminPoweroffResult, DefaultFuchsiaResourceDialect>
pub fn poweroff( &self, ) -> QueryResponseFut<AdminPoweroffResult, DefaultFuchsiaResourceDialect>
Asks all devices to enter a powered off state.
Sourcepub fn mexec(
&self,
kernel_zbi: Vmo,
data_zbi: Vmo,
) -> QueryResponseFut<AdminMexecResult, DefaultFuchsiaResourceDialect>
pub fn mexec( &self, kernel_zbi: Vmo, data_zbi: Vmo, ) -> QueryResponseFut<AdminMexecResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<AdminSuspendToRamResult, DefaultFuchsiaResourceDialect>
pub fn suspend_to_ram( &self, ) -> QueryResponseFut<AdminSuspendToRamResult, DefaultFuchsiaResourceDialect>
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 AdminProxyInterface for AdminProxy
impl AdminProxyInterface for AdminProxy
type PowerFullyOnResponseFut = QueryResponseFut<Result<(), i32>>
type RebootResponseFut = QueryResponseFut<Result<(), i32>>
type PerformRebootResponseFut = QueryResponseFut<Result<(), i32>>
type RebootToBootloaderResponseFut = QueryResponseFut<Result<(), i32>>
type RebootToRecoveryResponseFut = QueryResponseFut<Result<(), i32>>
type PoweroffResponseFut = QueryResponseFut<Result<(), i32>>
type MexecResponseFut = QueryResponseFut<Result<(), i32>>
type SuspendToRamResponseFut = QueryResponseFut<Result<(), i32>>
fn power_fully_on(&self) -> Self::PowerFullyOnResponseFut
fn reboot(&self, reason: RebootReason) -> Self::RebootResponseFut
fn perform_reboot( &self, options: &RebootOptions, ) -> Self::PerformRebootResponseFut
fn reboot_to_bootloader(&self) -> Self::RebootToBootloaderResponseFut
fn reboot_to_recovery(&self) -> Self::RebootToRecoveryResponseFut
fn poweroff(&self) -> Self::PoweroffResponseFut
fn mexec(&self, kernel_zbi: Vmo, data_zbi: Vmo) -> Self::MexecResponseFut
fn suspend_to_ram(&self) -> Self::SuspendToRamResponseFut
Source§impl Clone for AdminProxy
impl Clone for AdminProxy
Source§fn clone(&self) -> AdminProxy
fn clone(&self) -> AdminProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AdminProxy
impl Debug for AdminProxy
Source§impl Proxy for AdminProxy
impl Proxy for AdminProxy
Source§type Protocol = AdminMarker
type Protocol = AdminMarker
Proxy
controls.