[][src]Struct zeroconf::linux::AvahiMdnsService

pub struct AvahiMdnsService { /* fields omitted */ }

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.

See: AvahiClient::host_name()

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]

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.