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.
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 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 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.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
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for AdminProxy
impl !RefUnwindSafe for AdminProxy
impl Send for AdminProxy
impl Sync for AdminProxy
impl Unpin for AdminProxy
impl !UnwindSafe for AdminProxy
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
)