pub fn bind<A: AsRef<Path>>(addr: A) -> Result<UnixDatagram> {
        let sk = Socket::new(Domain::unix(), Type::dgram(), None)?;
        let addr = socket2::SockAddr::unix(addr.as_ref())?;
        sk.bind(&addr)?;
        Ok(Self {
            socket: GlommioDatagram::from(sk),
        })
    }
/// Creates a Unix Datagram socket bound to the specified address.
///
/// # Examples
///
/// ```no_run
/// use glommio::{net::UnixDatagram, LocalExecutor};
///
/// let ex = LocalExecutor::default();
/// ex.run(async move {
///     let listener = UnixDatagram::bind("/tmp/named_dgram").unwrap();
///     println!("Listening on {:?}", listener.local_addr().unwrap());
/// });
/// ```
Creates a Unix Datagram socket bound to the specified address.
Creates a Unix Datagram socket bound to the specified address .
pub fn bind<A: AsRef<Path>>(addr: A) -> Result<UnixDatagram> {
        let sk = Socket::new(Domain::unix(), Type::dgram(), None)?;
        let addr = socket2::SockAddr::unix(addr.as_ref())?;
        sk.bind(&addr)?;
        Ok(Self {
            socket: GlommioDatagram::from(sk),
        })
    }
pub fn bind < A : AsRef < Path > > ( addr : A ) -> Result < UnixDatagram > { let sk = Socket :: new ( Domain :: unix ( ) , Type :: dgram ( ) , None ) ? ; let addr = socket2 :: SockAddr :: unix ( addr . as_ref ( ) ) ? ; sk . bind ( & addr ) ? ; Ok ( Self { socket : GlommioDatagram :: from ( sk ) , } ) }
Creates a Unix Datagram socket bound to the specified address.
Creates a Unix Datagram socket bound to the specified address .
addr
A
addr
A
examples
```no_run
use glommio::{net::UnixDatagram, LocalExecutor}.

let ex = LocalExecutor::default();
ex.run(async move {
let listener = UnixDatagram::bind("/tmp/named_dgram").unwrap();
println!("Listening on {:?}", listener.local_addr().unwrap());
});
```
` ` ` no_run use glommio :: { net :: UnixDatagram LocalExecutor } . let ex = LocalExecutor :: default () ; ex . run ( async move { let listener = UnixDatagram :: bind ( " / tmp / named_dgram " ) . unwrap () ; println! ( " Listening on { : ? } " listener . local_addr () . unwrap () ) ; } ) ; ` ` `