pub struct ListenerRegistrySynchronousProxy { /* private fields */ }
Implementations§
Source§impl ListenerRegistrySynchronousProxy
impl ListenerRegistrySynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ListenerRegistryEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ListenerRegistryEvent, 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 register_blocking_listener(
&self,
listener: ClientEnd<BlockingListenerMarker>,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn register_blocking_listener( &self, listener: ClientEnd<BlockingListenerMarker>, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Registers listener
with the registry.
When the ListenerRegistry
learns of power state changes, the
ListenerRegistry
will forward the event to the listener
.
See documentation of the BlockingListener
methods for details
on which events are available, and the semantics of each callback.
The ListenerRegistry
MUST continue to forward events to the
listener
, even after the ListenerRegistry
connection
is closed.
Replaces any existing listener
that was previously registered.
Trait Implementations§
Source§impl SynchronousProxy for ListenerRegistrySynchronousProxy
impl SynchronousProxy for ListenerRegistrySynchronousProxy
Source§type Proxy = ListenerRegistryProxy
type Proxy = ListenerRegistryProxy
The async proxy for the same protocol.
Source§type Protocol = ListenerRegistryMarker
type Protocol = ListenerRegistryMarker
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 ListenerRegistrySynchronousProxy
impl RefUnwindSafe for ListenerRegistrySynchronousProxy
impl Send for ListenerRegistrySynchronousProxy
impl Sync for ListenerRegistrySynchronousProxy
impl Unpin for ListenerRegistrySynchronousProxy
impl UnwindSafe for ListenerRegistrySynchronousProxy
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