pub struct ActivityGovernorProxy { /* private fields */ }
Implementations§
source§impl ActivityGovernorProxy
impl ActivityGovernorProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.power.system/ActivityGovernor.
sourcepub fn take_event_stream(&self) -> ActivityGovernorEventStream
pub fn take_event_stream(&self) -> ActivityGovernorEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn get_power_elements(&self) -> QueryResponseFut<PowerElements>
pub fn get_power_elements(&self) -> QueryResponseFut<PowerElements>
Gets the power elements owned by the activity governor.
If an error occurs while the server is registering a power element with
the power broker or an error occurs while creating a token for a power
element, then the channel to ActivityGovernor
will be closed by the
server and no response will be returned.
sourcepub fn register_listener(
&self,
payload: ActivityGovernorRegisterListenerRequest
) -> QueryResponseFut<()>
pub fn register_listener( &self, payload: ActivityGovernorRegisterListenerRequest ) -> QueryResponseFut<()>
Registers a listener for activity governor events.
If there is an error in registering the listener, then the given
ActivityGovernorListener
channel will be closed before the response
is sent.
To unregister, close the ActivityGovernorListener
channel.
Trait Implementations§
source§impl ActivityGovernorProxyInterface for ActivityGovernorProxy
impl ActivityGovernorProxyInterface for ActivityGovernorProxy
type GetPowerElementsResponseFut = QueryResponseFut<PowerElements>
fn get_power_elements(&self) -> Self::GetPowerElementsResponseFut
type RegisterListenerResponseFut = QueryResponseFut<()>
fn register_listener( &self, payload: ActivityGovernorRegisterListenerRequest ) -> Self::RegisterListenerResponseFut
source§impl Clone for ActivityGovernorProxy
impl Clone for ActivityGovernorProxy
source§fn clone(&self) -> ActivityGovernorProxy
fn clone(&self) -> ActivityGovernorProxy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ActivityGovernorProxy
impl Debug for ActivityGovernorProxy
source§impl Proxy for ActivityGovernorProxy
impl Proxy for ActivityGovernorProxy
§type Protocol = ActivityGovernorMarker
type Protocol = ActivityGovernorMarker
The protocol which this
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Attempt to convert the proxy back into a client end. Read more
Auto Trait Implementations§
impl Freeze for ActivityGovernorProxy
impl !RefUnwindSafe for ActivityGovernorProxy
impl Send for ActivityGovernorProxy
impl Sync for ActivityGovernorProxy
impl Unpin for ActivityGovernorProxy
impl !UnwindSafe for ActivityGovernorProxy
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
Mutably borrows from an owned value. Read more