pub struct DiscoverySessionSynchronousProxy { /* private fields */ }
Implementations§
Source§impl DiscoverySessionSynchronousProxy
impl DiscoverySessionSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<DiscoverySessionEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<DiscoverySessionEvent, 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 stop(&self) -> Result<(), Error>
pub fn stop(&self) -> Result<(), Error>
Closes this DiscoverySession on the server end, ending discovery if this is the last open DiscoverySession. This can be used to synchronize the closure on both ends of the protocol. If synchronization is not required, the DiscoverySession protocol can simply be closed instead.
Trait Implementations§
Source§impl SynchronousProxy for DiscoverySessionSynchronousProxy
impl SynchronousProxy for DiscoverySessionSynchronousProxy
Source§type Proxy = DiscoverySessionProxy
type Proxy = DiscoverySessionProxy
The async proxy for the same protocol.
Source§type Protocol = DiscoverySessionMarker
type Protocol = DiscoverySessionMarker
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 DiscoverySessionSynchronousProxy
impl RefUnwindSafe for DiscoverySessionSynchronousProxy
impl Send for DiscoverySessionSynchronousProxy
impl Sync for DiscoverySessionSynchronousProxy
impl Unpin for DiscoverySessionSynchronousProxy
impl UnwindSafe for DiscoverySessionSynchronousProxy
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