pub struct ManagedAvahiServiceBrowser { /* private fields */ }
Expand description
Wraps the AvahiServiceBrowser
type from the raw Avahi bindings.
This struct allocates a new *mut AvahiServiceBrowser
when ManagedAvahiServiceBrowser::new()
is invoked and calls the Avahi function responsible for freeing the client on trait Drop
.
Implementations§
Source§impl ManagedAvahiServiceBrowser
impl ManagedAvahiServiceBrowser
Sourcepub unsafe fn new(
_: ManagedAvahiServiceBrowserParams,
) -> Result<ManagedAvahiServiceBrowser, Error>
pub unsafe fn new( _: ManagedAvahiServiceBrowserParams, ) -> Result<ManagedAvahiServiceBrowser, Error>
Initializes the underlying *mut AvahiClient
and verifies it was created; returning
Err(String)
if unsuccessful.
§Safety
This function is unsafe because of the raw pointer dereference.
Sourcepub unsafe fn get_client(&self) -> *mut AvahiClient
pub unsafe fn get_client(&self) -> *mut AvahiClient
Returns the underlying *mut AvahiServiceBrowser
.
§Safety
This function leaks the internal raw pointer, useful for accessing within callbacks where you are sure the pointer is still valid.
Trait Implementations§
Source§impl Debug for ManagedAvahiServiceBrowser
impl Debug for ManagedAvahiServiceBrowser
Auto Trait Implementations§
impl Freeze for ManagedAvahiServiceBrowser
impl RefUnwindSafe for ManagedAvahiServiceBrowser
impl !Send for ManagedAvahiServiceBrowser
impl !Sync for ManagedAvahiServiceBrowser
impl Unpin for ManagedAvahiServiceBrowser
impl UnwindSafe for ManagedAvahiServiceBrowser
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