pub struct ChannelControlSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ChannelControlSynchronousProxy
impl ChannelControlSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ChannelControlEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ChannelControlEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_current(
&self,
___deadline: MonotonicInstant,
) -> Result<String, Error>
pub fn get_current( &self, ___deadline: MonotonicInstant, ) -> Result<String, Error>
Retrieve the currently active update channel.
- response
channel
the currently active update channel.
Sourcepub fn set_target(
&self,
channel: &str,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn set_target( &self, channel: &str, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Set a new desired target channel. This tells the updater to attempt to check for updates using a new channel. This is tentative, and won’t be persisted unless an update check on that channel is successful.
A response is generated when the new target channel has been verified as valid.
- request
channel
the new target channel name (name used by the updater)
Sourcepub fn get_target(&self, ___deadline: MonotonicInstant) -> Result<String, Error>
pub fn get_target(&self, ___deadline: MonotonicInstant) -> Result<String, Error>
Get the current tentative target channel for updates. This returns the channel that the update client is using to perform update checks. It’s always one of:
-
the current channel
-
the default channel
-
a new target that’s different, but hasn’t been OTA’d from yet.
-
response
channel
the current target channel.
Sourcepub fn get_target_list(
&self,
___deadline: MonotonicInstant,
) -> Result<Vec<String>, Error>
pub fn get_target_list( &self, ___deadline: MonotonicInstant, ) -> Result<Vec<String>, Error>
Get the list of well-known target channels that can be passed to SetTarget(). There may be other, unlisted channels.
Trait Implementations§
Source§impl SynchronousProxy for ChannelControlSynchronousProxy
impl SynchronousProxy for ChannelControlSynchronousProxy
Source§type Proxy = ChannelControlProxy
type Proxy = ChannelControlProxy
Source§type Protocol = ChannelControlMarker
type Protocol = ChannelControlMarker
Proxy
controls.