pub struct ServiceBrowser { /* private fields */ }Expand description
A live handle to an ongoing browse operation.
Call recv to await discovery events. The underlying native
browse operation is stopped when this handle is dropped.
Implementations§
Source§impl ServiceBrowser
impl ServiceBrowser
Sourcepub async fn recv(&mut self) -> Option<Result<BrowseEvent, ServiceBrowseError>>
pub async fn recv(&mut self) -> Option<Result<BrowseEvent, ServiceBrowseError>>
Awaits the next discovery event.
Returns None once the browse has terminated (the back-end shut down or
the handle is being dropped). A failure to resolve an individual service
is reported as Some(Err(..)) and does not end the stream.
Auto Trait Implementations§
impl Freeze for ServiceBrowser
impl RefUnwindSafe for ServiceBrowser
impl Send for ServiceBrowser
impl Sync for ServiceBrowser
impl Unpin for ServiceBrowser
impl UnsafeUnpin for ServiceBrowser
impl UnwindSafe for ServiceBrowser
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