pub struct ElementControlSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ElementControlSynchronousProxy
impl ElementControlSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ElementControlEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ElementControlEvent, 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 open_status_channel(
&self,
status_channel: ServerEnd<StatusMarker>,
) -> Result<(), Error>
pub fn open_status_channel( &self, status_channel: ServerEnd<StatusMarker>, ) -> Result<(), Error>
Register a new Status channel on which Power Broker will send read-only updates of the element’s current power level. This method is intended to allow element owners to give read-only access to the element’s current power level to clients by opening and transferring this channel.
Sourcepub fn register_dependency_token(
&self,
token: Event,
dependency_type: DependencyType,
___deadline: MonotonicInstant,
) -> Result<ElementControlRegisterDependencyTokenResult, Error>
pub fn register_dependency_token( &self, token: Event, dependency_type: DependencyType, ___deadline: MonotonicInstant, ) -> Result<ElementControlRegisterDependencyTokenResult, Error>
Register a token which will permit the bearer to add either an assertive or opportunistic dependency upon this element, depending on the dependency_type specified.
Sourcepub fn unregister_dependency_token(
&self,
token: Event,
___deadline: MonotonicInstant,
) -> Result<ElementControlUnregisterDependencyTokenResult, Error>
pub fn unregister_dependency_token( &self, token: Event, ___deadline: MonotonicInstant, ) -> Result<ElementControlUnregisterDependencyTokenResult, Error>
Unregister a token previously registered via RegisterDependencyToken.
Trait Implementations§
Source§impl SynchronousProxy for ElementControlSynchronousProxy
impl SynchronousProxy for ElementControlSynchronousProxy
Source§type Proxy = ElementControlProxy
type Proxy = ElementControlProxy
The async proxy for the same protocol.
Source§type Protocol = ElementControlMarker
type Protocol = ElementControlMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for ElementControlSynchronousProxy
impl RefUnwindSafe for ElementControlSynchronousProxy
impl Send for ElementControlSynchronousProxy
impl Sync for ElementControlSynchronousProxy
impl Unpin for ElementControlSynchronousProxy
impl UnwindSafe for ElementControlSynchronousProxy
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