[−][src]Struct zeroconf::linux::AvahiMdnsService
Interface for interacting with Avahi's mDNS service registration capabilities.
Implementations
impl AvahiMdnsService
[src]
pub fn new(kind: &str, port: u16) -> Self
[src]
Creates a new AvahiMdnsService
with the specified kind
(e.g. _http._tcp
) and port
.
pub fn set_name(&mut self, name: &str)
[src]
Sets the name to register this service under. If no name is set, the client's host name will be used instead.
pub fn set_client_flags(&mut self, client_flags: u32)
[src]
Sets the AvahiClientFlags
supplied to the ManagedAvahiClient
during initialization.
Only set this if you know what you're doing, the default value of 0
is what most users
will use.
pub fn set_registered_callback(
&mut self,
registered_callback: Box<ServiceRegisteredCallback>
)
[src]
&mut self,
registered_callback: Box<ServiceRegisteredCallback>
)
Sets the ServiceRegisteredCallback
that is invoked when the service has been
registered.
pub fn set_context(&mut self, context: Box<dyn Any>)
[src]
Sets the optional user context to pass through to the callback. This is useful if you need
to share state between pre and post-callback. The context type must implement Any
.
pub fn start(&mut self) -> Result<()>
[src]
Registers and start's the service; continuously polling the event loop. This call will block the current thread.
Trait Implementations
impl Debug for AvahiMdnsService
[src]
impl Drop for AvahiMdnsService
[src]
Auto Trait Implementations
impl !RefUnwindSafe for AvahiMdnsService
impl !Send for AvahiMdnsService
impl !Sync for AvahiMdnsService
impl Unpin for AvahiMdnsService
impl !UnwindSafe for AvahiMdnsService
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,