pub struct ChannelListenerRegistrySynchronousProxy { /* private fields */ }
Implementations§
Source§impl ChannelListenerRegistrySynchronousProxy
impl ChannelListenerRegistrySynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ChannelListenerRegistryEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ChannelListenerRegistryEvent, 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 listen_l2cap(
&self,
payload: ChannelListenerRegistryListenL2capRequest,
___deadline: MonotonicInstant,
) -> Result<ChannelListenerRegistryListenL2capResult, Error>
pub fn listen_l2cap( &self, payload: ChannelListenerRegistryListenL2capRequest, ___deadline: MonotonicInstant, ) -> Result<ChannelListenerRegistryListenL2capResult, Error>
Register a listener for incoming channels. The registry will assign a
PSM value that is unique for the local device, as well as open a
[ChannelListener
] for accepting incoming channels. In the unlikely
event that all PSMs have been assigned, this call will fail with
ZX_ERR_NO_RESOURCES
.
Note that the method of service discovery or advertising is defined by the service or protocol, so it is the responsibility of the caller to communicate the assigned PSM to any clients.
Trait Implementations§
Source§impl SynchronousProxy for ChannelListenerRegistrySynchronousProxy
impl SynchronousProxy for ChannelListenerRegistrySynchronousProxy
Source§type Proxy = ChannelListenerRegistryProxy
type Proxy = ChannelListenerRegistryProxy
The async proxy for the same protocol.
Source§type Protocol = ChannelListenerRegistryMarker
type Protocol = ChannelListenerRegistryMarker
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 ChannelListenerRegistrySynchronousProxy
impl RefUnwindSafe for ChannelListenerRegistrySynchronousProxy
impl Send for ChannelListenerRegistrySynchronousProxy
impl Sync for ChannelListenerRegistrySynchronousProxy
impl Unpin for ChannelListenerRegistrySynchronousProxy
impl UnwindSafe for ChannelListenerRegistrySynchronousProxy
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