pub struct ClientConfiguratorProxy { /* private fields */ }
Implementations§
Source§impl ClientConfiguratorProxy
impl ClientConfiguratorProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.power.systemmode/ClientConfigurator.
Sourcepub fn take_event_stream(&self) -> ClientConfiguratorEventStream
pub fn take_event_stream(&self) -> ClientConfiguratorEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get(
&self,
client_type: ClientType,
) -> QueryResponseFut<Option<Box<ClientConfig>>, DefaultFuchsiaResourceDialect>
pub fn get( &self, client_type: ClientType, ) -> QueryResponseFut<Option<Box<ClientConfig>>, DefaultFuchsiaResourceDialect>
Gets the power configuration for the given [ClientType
].
If there is no power configuration for client_type
then the returned
value will be absent.
client_type
specifies which [ClientType
]ClientConfig
to get
config
is the returned client-specific configuration, or an absent value ifclient_type
does not have an existing configuration
Sourcepub fn set(
&self,
client_type: ClientType,
config: &ClientConfig,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn set( &self, client_type: ClientType, config: &ClientConfig, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Sets the power configuration for the given [ClientType
].
This method should be used in tandem with [GetConfig
] in order to
update the existing power configuration for a given [ClientType
]
without fully overwriting it.
When the power configuration for a given [ClientType
] is changed, the
Power Manager will reevaluate current power level of that [ClientType
]
according to the new configuration. This reevaluation may result in a
new power level being sent to the connected client.
The call returns immediately after the new config has been received and validated. Actual system changes to be applied as a result of changing a client’s configuration will occur after the call has returned. Therefore, any errors that occur while updating clients according to the new system power mode are not propagated back to the caller. Instead, client updates are applied on a “best effort” basis.
If the provided config
is not valid, then no changes will be applied
and the channel will be closed. Validation will fail if a given
SystemMode
is repeated across multiple mode_match
entries contained
by the ClientConfig
.
client_type
specifies which [ClientType
]’sClientConfig
to setconfig
is theClientConfig
that will be set for [client_type
]
Trait Implementations§
Source§impl ClientConfiguratorProxyInterface for ClientConfiguratorProxy
impl ClientConfiguratorProxyInterface for ClientConfiguratorProxy
type GetResponseFut = QueryResponseFut<Option<Box<ClientConfig>>>
type SetResponseFut = QueryResponseFut<()>
fn get(&self, client_type: ClientType) -> Self::GetResponseFut
fn set( &self, client_type: ClientType, config: &ClientConfig, ) -> Self::SetResponseFut
Source§impl Clone for ClientConfiguratorProxy
impl Clone for ClientConfiguratorProxy
Source§fn clone(&self) -> ClientConfiguratorProxy
fn clone(&self) -> ClientConfiguratorProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ClientConfiguratorProxy
impl Debug for ClientConfiguratorProxy
Source§impl Proxy for ClientConfiguratorProxy
impl Proxy for ClientConfiguratorProxy
Source§type Protocol = ClientConfiguratorMarker
type Protocol = ClientConfiguratorMarker
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 ClientConfiguratorProxy
impl !RefUnwindSafe for ClientConfiguratorProxy
impl Send for ClientConfiguratorProxy
impl Sync for ClientConfiguratorProxy
impl Unpin for ClientConfiguratorProxy
impl !UnwindSafe for ClientConfiguratorProxy
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
)