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>
pub fn power_fully_on(&self) -> QueryResponseFut<AdminPowerFullyOnResult>
Asks the device to enter a fully on state.
sourcepub fn reboot(
&self,
reason: RebootReason
) -> QueryResponseFut<AdminRebootResult>
pub fn reboot( &self, reason: RebootReason ) -> QueryResponseFut<AdminRebootResult>
Asks the device to reboot.
sourcepub fn reboot_to_bootloader(
&self
) -> QueryResponseFut<AdminRebootToBootloaderResult>
pub fn reboot_to_bootloader( &self ) -> QueryResponseFut<AdminRebootToBootloaderResult>
Asks the device to reboot into the bootloader.
sourcepub fn reboot_to_recovery(
&self
) -> QueryResponseFut<AdminRebootToRecoveryResult>
pub fn reboot_to_recovery( &self ) -> QueryResponseFut<AdminRebootToRecoveryResult>
Asks the device to reboot into the recovery partition.
sourcepub fn poweroff(&self) -> QueryResponseFut<AdminPoweroffResult>
pub fn poweroff(&self) -> QueryResponseFut<AdminPoweroffResult>
Asks all devices to enter a powered off state.
sourcepub fn mexec(
&self,
kernel_zbi: Vmo,
data_zbi: Vmo
) -> QueryResponseFut<AdminMexecResult>
pub fn mexec( &self, kernel_zbi: Vmo, data_zbi: Vmo ) -> QueryResponseFut<AdminMexecResult>
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>
pub fn suspend_to_ram(&self) -> QueryResponseFut<AdminSuspendToRamResult>
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>>
fn power_fully_on(&self) -> Self::PowerFullyOnResponseFut
type RebootResponseFut = QueryResponseFut<Result<(), i32>>
fn reboot(&self, reason: RebootReason) -> Self::RebootResponseFut
type RebootToBootloaderResponseFut = QueryResponseFut<Result<(), i32>>
fn reboot_to_bootloader(&self) -> Self::RebootToBootloaderResponseFut
type RebootToRecoveryResponseFut = QueryResponseFut<Result<(), i32>>
fn reboot_to_recovery(&self) -> Self::RebootToRecoveryResponseFut
type PoweroffResponseFut = QueryResponseFut<Result<(), i32>>
fn poweroff(&self) -> Self::PoweroffResponseFut
type MexecResponseFut = QueryResponseFut<Result<(), i32>>
fn mexec(&self, kernel_zbi: Vmo, data_zbi: Vmo) -> Self::MexecResponseFut
type SuspendToRamResponseFut = QueryResponseFut<Result<(), i32>>
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
§type Protocol = AdminMarker
type Protocol = AdminMarker
Proxy
controls.